Using database migrations plugin from within another plugin
The plugin infrastructure provides Grails with great power in how to structure the code base for their applications. For example, if you had to make customizations to your project for a particular client, you could place all your core code in a plugin and have a default and a custom application depending on that plugin.
For whatever reason you decide in having a "core" plugin, you might encounter a few bumps in the process. One such bump involves the database migrations plugin. By default the database plugin expects the migration changelogs to be in grails-app/migrations. It is possible to change this location via the configuration config.grails.plugin.databasemigration.changelogLocation, but this requires knowing the location of plugin. So one solution is to put code like the following somewhere in your plugin:Note that in my case, I'm using the platform-core-plugin so it seems appropriate to put it in the doWithConfig closure of my Plugin definition file.