(Quick Reference)

3 Configuration - Reference Documentation

Authors: Burt Beckwith

Version: 1.4.0

3 Configuration

There are a few configuration options for the plugin:

PropertyDefaultMeaning
grails.plugin.databasemigration. changelogLocationgrails-app/migrationsthe folder containing the main changelog file (which can include one or more other files)
grails.plugin.databasemigration. changelogFileNamechangelog.groovythe name of the main changelog file
grails.plugin.databasemigration. changelogPropertiesnonea map of properties to use for property substitution in Groovy DSL changelogs
grails.plugin.databasemigration. contextsnoneA comma-delimited list of context names. If specified, only changesets tagged with one of the context names will be run
grails.plugin.databasemigration. dbDocLocationtarget/dbdocthe directory where the output from the dbm-db-doc script is written
grails.plugin.databasemigration. dbDocController.enabledtrue in dev modewhether the /dbdoc/ url is accessible at runtime
grails.plugin.databasemigration. dropOnStartfalseif true then drops all tables before auto-running migrations (if updateOnStart is true)
grails.plugin.databasemigration. updateOnStartfalseif true then changesets from the specified list of names will be run at startup
grails.plugin.databasemigration. updateOnStartFileNamesnoneone or more file names (relative to changelogLocation) to run at startup if updateOnStart is true
grails.plugin.databasemigration. updateOnStartDefaultSchemanonethe default schema to use when running auto-migrate on start
grails.plugin.databasemigration. updateOnStartContextsnoneA comma-delimited list of context names. If specified, only changesets tagged with one of the context names will be run
grails.plugin.databasemigration. autoMigrateScripts'RunApp'the scripts when running auto-migrate. Useful to run auto-migrate during test phase with: 'RunApp', 'TestApp'
grails.plugin.databasemigration. ignoredColumnsnoneone or more database column names (regexes) to ignore while performing a dbm-gorm-diff or dbm-generate-gorm-changelog
grails.plugin.databasemigration. ignoredObjectsnoneone or more database object names to ignore while performing a dbm-gorm-diff or dbm-generate-gorm-changelog
grails.plugin.databasemigration. databaseChangeLogTableName'databasechangelog'the Liquibase changelog record table name
grails.plugin.databasemigration. databaseChangeLogLockTableName'databasechangeloglock'the Liquibase lock table name

All of the above configs can be used for a multiple datasources in Grails 2.0.x.

Multiple DataSource Example:

If a reports dataSource is configured in DataSource.groovy
dataSource_reports {
   url = …
   driverClassName = …
   …
}

The configuration for this data source would be:

grails.plugin.databasemigration.reports.updateOntart = true
grails.plugin.databasemigration.reports.changelogFileName = changelog-reports.groovy