Add the config below to the Config.groovy file. Migration will occur during the deployment of WAR.
grails.plugin.databasemigration.updateOnStart = true
grails.plugin.databasemigration.updateOnStartFileNames = ['changelog.groovy']
grails.plugin.databasemigration.changelogLocation = 'migrations'
Based on the configuration above, here is what your folder structure looks like:
your-grails-project
changelog.groovy
databaseChangeLog = {
include file: 'migration1.groovy'
include file: 'migration2.groovy'
}
source
share