Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrationCallbacks run every time, not only when outstanding migrations are detected #152

Open
robertoschwald opened this issue Dec 4, 2018 · 0 comments · May be fixed by #186
Open

migrationCallbacks run every time, not only when outstanding migrations are detected #152

robertoschwald opened this issue Dec 4, 2018 · 0 comments · May be fixed by #186

Comments

@robertoschwald
Copy link
Contributor

robertoschwald commented Dec 4, 2018

in 1.x, migrationCallbacks.beforeStartMigration was triggered only when outstanding migrations were detected.
Now it runs every time.

This means e.g. automatic db backup using a callback bean is not possible anymore (or needs back-porting of the old behaviour into the callback bean).

See here how it behaved before:

https://github.com/grails-plugins/grails-database-migration/blob/33a93c7012caa15d2c209263ae3b943ea4e15d46/src/groovy/grails/plugin/databasemigration/MigrationRunner.groovy#L107

and now:
https://github.com/grails-plugins/grails-database-migration/blob/00c35ad00c2944c9128269c8ed2956f3443993c3/src/main/groovy/org/grails/plugins/databasemigration/liquibase/GrailsLiquibase.groovy#L90

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant