Wednesday, December 26, 2007

Database Refactoring with Liquibase

I currently work with a very database-centric team. While this has allowed me to work with some great Oracle DBA's and developers. That being said, when release time comes changes to the database are fairly ad-hoc. There is no standard way in which additions, removals, or updates are made; everything is performed by sql scripts each written by the developer. We do have a code review process, but with there being no strict guides to work within everything ends up being somewhat of a hodgepodge.

Having worked with Rails for a little while also now, I was wondering if there were any equivalent database migration tools for Java. My search has lead me to Liquibase. Liquibase provides an entire database refactoring framework through some simple xml change set files. The change sets can be applied through command line, ant, maven, spring, and some other methods. It initially seems very promising, in particular the automatic rollback generation, and the simple fact that it provides a consistent way to migrate a database.

I've only just got started with it but am hoping it continues to live up to the initial promise.