Hello everybody,
Example:
<changeSet id="id1" author="mmr" dbms="postgresql">
<createTable tableName="TABLE_TO_DROP">
<column name="ID" type="BIGINT"/>
<column name="TEXT_VALUE" type="VARCHAR(64)"/>
</createTable>
<rollback>
<dropTable tableName="TABLE_TO_DROP"/>
</rollback>
</changeSet>
<changeSet id="id2" author="mmr" dbms="postgresql">
<dropTable tableName="TABLE_TO_DROP"/>
<rollback changeSetId="id1" changeSetAuthor="mmr"/>
</changeSet>
This code runs correct when the underlying database is postgres.
Running the code on H2 database, i get this error:
- Caused by: liquibase.parser.core.ParsedNodeException: Change set path-ignored::id1::mmr does not exist
at liquibase.changelog.ChangeSet.handleRollbackNode(ChangeSet.java:399)
at liquibase.changelog.ChangeSet.handleChildNode(ChangeSet.java:317)
at liquibase.changelog.ChangeSet.load(ChangeSet.java:311)
at liquibase.changelog.DatabaseChangeLog.createChangeSet(DatabaseChangeLog.java:513)
at liquibase.changelog.DatabaseChangeLog.handleChildNode(DatabaseChangeLog.java:311)
at liquibase.changelog.DatabaseChangeLog.load(DatabaseChangeLog.java:282)
at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:25)
It seems, that the liquibase validates the <rollback>-tag although the parent changeSet and the changeSet "id1" are both not for the H2 database.
My Question:
Is this a known bug? Do you know a work-around for this problem?
Thanks in advance and best regards,
Matthias