Precondition negation does not seem to work
Description
Environment
ORACLE, MAVEN
Activity
Show:
Nathan Voxland December 12, 2013 at 3:28 PM
This is working for me in 3.0.8. Perhaps fixed by a separate issue
Florent Biville September 17, 2013 at 2:23 PM
As a workaround, I successfully ran a custom SQL statement with <sqlCheck>.
Hi,
I've been trying to run the following changeset, via the Maven plugin:
<changeSet id="add-sousActivite-chCsim" author="f.biville"> <!-- transition: this script has been manually run before --> <preConditions onFail="MARK_RAN"> <not><columnExists schemaName="test_flo" tableName="SousActivite" columnName="forceFree" /></not> </preConditions> <sqlFile path="sql/20130730-add-sousActivite-chCsim.sql" relativeToChangelogFile="true" /> </changeSet>
However, I get the following error :
[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.0.4:update (default-cli) on project migrations: Error setting up or running Liquibase: Migration failed for change set target/classes/.../20130904-add-sousActivite-chCsim.xml::add-sousActivite-chCsim::f.biville: [ERROR] Reason: [ERROR] target/classes/.../master.xml : liquibase.precondition.core.ColumnExistsPrecondition@5f1965c7 : No Columns found for table SOUSACTIVITE: Precondition Error
I checked with version 3.0.3, same issue.
It seems like the <not> tag is somehow ignored.
In my case, the column does not indeed yet exist: and I expect the changeset to be run, not failing.
Am I missing something?