Liquibase – A Smart Database-Migration Tool

I just want to make some publicity for liquibase, which is a tool (the only one?) for database migrations in Java and licensed under LGPL.So you can deploy it to your server if you want very hot database changes.

Liquibase is sth. like the rails db migrations but for Java😉.

One note: if you want to use liquibase from maven – use the following configuration so that you can call

mvn liquibase:updateSQL

Then you don’t bind the sql-update process to a build step like proposed in the docs.

Other useful infos are:

  • liquibase-plugin is, but core is only 1.9.0
  • use the hibernate config file to generate the diff. (Is this even possible if I use annotations?)
  • keep in mind that you have to specify the rollback tags if you call ‘mvn liquibase:rollback -Dliquibase.rollbackCount=1’:
      <changeSet id="1" author="pk">
            <createTable tableName="test">
                <column name="id" type="int">
                    <constraints primaryKey="true" nullable="false"/>
                <dropTable tableName="test"/>
  • docs, video docs
  • the project blog

One thought on “Liquibase – A Smart Database-Migration Tool

  1. Pingback: Migrate to Liquibase « Java and more …

Comments are closed.