3 Configuration - Reference Documentation
Authors: Burt Beckwith
Version: 1.4.0
3 Configuration
There are a few configuration options for the plugin:Property | Default | Meaning |
---|---|---|
grails.plugin.databasemigration. changelogLocation | grails-app/migrations | the folder containing the main changelog file (which can include one or more other files) |
grails.plugin.databasemigration. changelogFileName | changelog.groovy | the name of the main changelog file |
grails.plugin.databasemigration. changelogProperties | none | a map of properties to use for property substitution in Groovy DSL changelogs |
grails.plugin.databasemigration. contexts | none | A comma-delimited list of context names. If specified, only changesets tagged with one of the context names will be run |
grails.plugin.databasemigration. dbDocLocation | target/dbdoc | the directory where the output from the dbm-db-doc script is written |
grails.plugin.databasemigration. dbDocController.enabled | true in dev mode | whether the /dbdoc/ url is accessible at runtime |
grails.plugin.databasemigration. dropOnStart | false | if true then drops all tables before auto-running migrations (if updateOnStart is true) |
grails.plugin.databasemigration. updateOnStart | false | if true then changesets from the specified list of names will be run at startup |
grails.plugin.databasemigration. updateOnStartFileNames | none | one or more file names (relative to changelogLocation ) to run at startup if updateOnStart is true |
grails.plugin.databasemigration. updateOnStartDefaultSchema | none | the default schema to use when running auto-migrate on start |
grails.plugin.databasemigration. updateOnStartContexts | none | A 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. ignoredColumns | none | one or more database column names (regexes) to ignore while performing a dbm-gorm-diff or dbm-generate-gorm-changelog |
grails.plugin.databasemigration. ignoredObjects | none | one 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.groovydataSource_reports { url = … driverClassName = … … }
grails.plugin.databasemigration.reports.updateOntart = true
grails.plugin.databasemigration.reports.changelogFileName = changelog-reports.groovy