Kennis Liquibase - database change management

Liquibase - database change management

For a Java based product we picked Liquibase as the database change management solution. Want to know how we got there?

The solution we are looking for:

  • Does not *peep* up existing databases or data
  • Does not make people do overly uninteresting things when upgrading (it minimizes human intervention)
  • Must support multiple database (Oracle, MySQL, SQL Server, PosgresSQL and for development HSQLBD)
  • Is able to skip intermediate version while upgrading
  • Keeps things simple
  • Must we do complexer things, we must be able to do it on the JVM
  • Plays nicely with Hibernate
  • It has an API to call from the application

What we don't necessarily need:

  • Downgrading (use backup data for that instead)

A quick comparison of available solutions and the characteristics is available on the website of Flyway, one of the candidates.

There are two solutions that at first glance match all our requirements. Flyway and Liquibase. There is however one very distinct difference in the database support. Flyway has very nice plain old sql migrations. Liquibase specifies database refactorings in xml. What liquibase can do is translate the xml definitions to database specific code. That gives us a database agnostic way to define our database schema.

If you don't need to deploy the same deployment package to several database types, you might want to pick Flyway for it's simplicity. We picked Liquibase for it's extensive database support. What's your pick?