Liquibase Update command not executing rollback changesets

By specifying an empty rollback tag, you have effectively told Liquibase “this does not need to be rolled back”. Since the createTable change can automatically be rolled back, just removing the rollback tag should accomplish what you want. If you wanted to do more than just drop the table on rollback, you could add more to the rollback tag.

Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/

Actually, the rollback tag isn’t empty, it is referencing a changelog. That is telling liquibase that to rollback changeSet “test-1111-rollback” you execute what is in “test-1111” which creates the table.

Steve’s answer is still correct, though. You don’t need the test-1111-rollback changeSet at all. Take it out and Liquibase automatically knows how to rollback test-1111 if you ask it to.

Nathan

Hi, I have the following changelog :

<?xml version="1.0" encoding="utf-8" standalone="no"?>

<databaseChangeLog xmlns=“http://www.liquibase.org/xml/ns/dbchangelog” xmlns:ext=“http://www.liquibase.org/xml/ns/dbchangelog-ext” 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.4.xsd http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd”>

<createTable tableName="test"></div>

  <column name="FieldName" type="VARCHAR(50)" /></div>

</createTable></div>

<createTable tableName="table_test_commit"></div>

  <column name="contacto" type="VARCHAR(50)" /></div>

</createTable></div>

<rollback changeSetId="test-1111" changeSetAuthor="Paulo" /></div>

When I execute the update command with this changelog I want it to be able to rollaback the selected changeset by dropping the created table but it’s not working, Is that possible or is there another way to do it that I’m missing?