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:
- Copy and paste the plugin configuration to your pom.xml.
- Add a couple of SQL scripts into your src/main/db/migrations in the format of yyyyMMddHHmmss_some_description.sql
- 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.
0 comments:
Post a Comment