I have the following changeset, using LiquiBase 3.5.1 (latest):
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
<preConditions onFail="MARK_RAN">
<sqlCheck expectedResult="2">SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'dbo';</sqlCheck>
</preConditions>
<changeSet author="user" id="base">
<sqlFile path="liquibase/base.sql"/>
</changeSet>
</databaseChangeLog>
Seems simply enough, right? The idea is that it checks to see if the DB is empty (checking for 2 tables for the Liquibase tables that are auto-generated) and if it is, run a base script. If it fails, however, it is supposed to mark the changeset as run and move along (documentation for the feature here). However, I get the following error:
Value 'MARK_RAN' is not facet-valid with respect to enumeration '[HALT, WARN]'.
MARK_RAN
is not available on the changelog level. Only on changesets. - Jens