grails-plugins/grails-database-migration — pull request #13 by scottvlaminck (2012-05-30 18:08:45+00:00)
Title: Allow auto-run to be configured with explicit contexts

This is very similar to https://github.com/grails-plugins/grails-database-migration/pull/2

The differences are minor, but the config name and MigrationRunner.autoRun() implementation is consistent with other parameters (e.g. updateOnStartDefaultSchema).

In addition to the use case specified in the other pull request (loading test data based on grails environment), I see value in this change to support zero-downtime deployments: auto-running "before" updates (e.g. new tables and columns) on grails startup and handling "after" updates separately (e.g. dropping unused tables/columns and adding not-null constraints, etc).