Tag Archives: database migration

Running custom SQL in Grails database migration plugin changesets

Under the hood, the grails database migration plugin uses Liquibase. Liquibase offers the ability to insert arbitrary SQL in changesets.

This post highlights how to use the sql and sqlFile commands in liquibase to run arbitrary URLs in database migrations.

This feature is useful if you want to set default values for existing data in the database. It can also use to load data snapshots or ensure specific rows exist in your database.

This is also useful to pre-populate databases on certain beta cloud solutions that surprisingly won’t let you access their databases externally ( cough, CloudFoundry ).

Continue reading

Working with the Grails Database Migration Plugin

I’ve recently spent some time exploring the new database migration plugin in Grails. Here are a few notes that I hope will help you out if you’re looking into using this plugin. Continue reading