Fork me on GitHub

n. Slang a rough lawless young Kuali developer.
[perhaps variant of Houlihan, Irish surname]
kualiganism n

Blog of an rSmart Java Developer. Full of code examples, solutions, best practices, et al.

Tuesday, April 27, 2010

KIS of the Dragon - Testing Liquibase Changelogs

Here is a screencast on how to test changelogs with Liquibase tagging and rollback commands.


The Breakdown


  1. Tag the database
    You want to tag before changes are made. This is for rolling back later.

    % liquibase --defaultsFile=liquibase.properties tag

  2. Run your update

    % liquibase --defaultsFile=liquibase.properties --changeLogFile=your changelog update <your tag name>

  3. Rollback
    You can rollback if you make a mistake and run your update again, but to make sure you leave the place the same as when you came in, cleanup with rollback.

    % liquibase --defaultsFile=liquibase.properties rollback <tag you used earlier>

No comments:

Post a Comment