Monday, November 16, 2009

Maven database migration plugin

I finally got around to testing c5-db-migration -- a database migration plugin for Maven. Essentially, it's tool for managing your database changes. The plugin is very straightforward to use:
  1. Copy and paste the plugin configuration to your pom.xml.
  2. Add a couple of SQL scripts into your src/main/db/migrations in the format of yyyyMMddHHmmss_some_description.sql
  3. And run mvn db-migration:migrate to run the SQL scripts against your database.
The plugin tracks your migration in a table called schema_version. It's not as comprehensive as Rail's database migration tool (e.g., it doesn't support downward migrations). Nevertheless, it's simple and unobtrusive.

If you're managing database changes manually through collections of SQL scripts, there's no reason why you shouldn't give this plugin a try.

1 comment:

  1. Wonderful post! I am highly agree with the writer's way of thinking.
    The deletion of files nearly always causes a person to some feeling of discontent.
    A range of file recovery apps are already developed by the experts, guaranteeing that an individual may easily retrieve the damaged files.
    Seageta Hard Drive Data Recovery