annotationsatharvard / catcha

Catch-A - Catching Annotation: An annotation backend and API.
http://catcha.readthedocs.io
20 stars 9 forks source link

Generate initial changelog using database migration plugin #23

Closed jmiranda closed 10 years ago

jmiranda commented 10 years ago

Install database migration plugin Add the following runtime plugin dependency to BuildConfig.groovy

plugins {
        ...
        runtime ':database-migration:1.3.8'
        ...
}

Configure plugin to run new migrations on startup

grails.plugin.databasemigration.updateOnStart = true
grails.plugin.databasemigration.updateOnStartFileNames = ["changelog.groovy"]

Generate initial changelog The following is a simplified version of the command. I actually move the generated changelog.groovy file into a file called create-schema.groovy and included that file within the changelog.groovy file.

$ grails dbm-gorm-diff changelog.groovy

Ensure that the database engine is set to InnoDB

mysql> show table status;
jmiranda commented 10 years ago

Fixed