Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

Rollback not working using rollback tag

$
0
0
My Changelog xml:

<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.1.xsd" logicalFilePath="2014_06_dml_WN.xml">
<changeSet author="Raja" id="wn_dml_2014_06.1">
<sql>INSERT INTO TMP_NMOCI VALUES('TESTDATA1','TESTDATA2')</sql>
<rollback>
<sql>DELETE FROM TMP_NMOCI WHERE COLUMN1 = 'TESTDATA1' AND COLUMN2 = 'TESTDATA2'</sql>
</rollback>
</changeSet>
<changeSet author="Raja" id="wn_dml_tag_2014_06.1">
<tagDatabase tag="wn_dml_2014_06.1"/>
</changeSet>
</databaseChangeLog>


I have 2 entries in the databasechangelog table. Now when I run rollback using the tag ''wn_dml_2014_06.1" nothing happens. But when I run the rollback using rollbackcount as 2 it works and both the entries are deleted from databasechangelog and from the table as well. Am I doing anything wrong while creating tag or while doing rollback tag. Please help me on this?

Viewing all articles
Browse latest Browse all 2993

Trending Articles