The preConditions documentation includes the following:
<changeSet id=“1” author=“bob”> <preConditions onFail=“WARN”> <sqlCheck expectedResult=“0”>select count(*) from oldtable</sqlCheck> </preConditions> <comment>Comments should go after preCondition. If they are before then liquibase usually gives error.</comment> <dropTable tableName=“oldtable”/> </changeSet>
It will also only run the drop_Table command if there are no values in the “oldtable”.
However, WARN is described in the table beneath as:
Suggesting the code snippet will execute the dropTable. Trying it, this appears to be the case.Output warning and continue executing change set as normal.
So I’m wondering if that should be CONTINUE or MARK_RAN?
Apologies if I’ve complete misread it!
Pete