Hi,
I saw some forum posts related on this issue but I couldn’t find a solution to my specific problem.
I’m using liquibase 1.9.3 in combination with an oracle XE 10 database.
The problem I have is that my complete migration is failing because 1 precondition is not met. I would like my migration to continue with the next files instead of completely failing.
According to the tutorial I found on working with an oracle database I’m trying the following scenario:
in my update.xml file I have:
[sub]<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns=“http://www.liquibase.org/xml/ns/dbchangelog/1.9”
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=“http://www.liquibase.org/xml/ns/dbchangelog/1.9 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd”>
[/sub]
and in v000\master.xml I added which is currently in my databasechangelog table
in both master.xml files I use a preCondition like this:
v000:
[sup]
SELECT NVL(MAX(id),0)
FROM databasechangelog
WHERE author=‘MajorVersion’
[/sup]
and v001:
[sup]
SELECT NVL(MAX(id),0)
FROM databasechangelog
WHERE author=‘MajorVersion’
[/sup]
when I run the update.xml I would expect that only the v001\master.xml is performed because the preCondition in v000\master.xml will evaluate to false. But instead I get:
Migration Failed: Validation Failed:
1 preconditions failed
update.xml : SQL Precondition failed. Expected ‘0’ got ‘1’
. For more information, use the --logLevel flag)
Is this a bug? Or am I doing something wrong?
Any pointers and/or help would be greatly appreciated.
Best regards
Ruud