grails-quartz icon indicating copy to clipboard operation
grails-quartz copied to clipboard

Enhancement: database-migration plugin support

Open robertoschwald opened this issue 9 years ago • 4 comments

Currently, it seems one needs to create the quartz tables manually when using jdbcStore = true. It would be great if the plugin supports database-migration, to create the quartz table migrations automatically with dbm-gorm-diff, like the database-migration plugin does itself to create the liquibase tables.

robertoschwald avatar Sep 14 '16 09:09 robertoschwald

For this support, the plugin needs to ensure that it runs after the database-migration plugin. Currently, it runs before here when using this migration:

https://gist.github.com/robertoschwald/3e67d921118f53e8f8e6dd79e64b41a9

robertoschwald avatar Nov 02 '16 18:11 robertoschwald

Any word on whether this will make it into the plugin? Just hit this problem this afternoon.

ebakke avatar Jan 19 '18 01:01 ebakke

@robertoschwald please submit the PR with required changes.

puneetbehl avatar Jan 19 '18 09:01 puneetbehl

The following things need to be done to integrate the plugin with dbm:

  1. Create a dbm migration file to create the necessary changes
  2. Add the migration to changelog.groovy
  3. Exclude the Quartz tables from dbm config, as there are no real Quartz Domain classes
  4. Ensure Quartz runs after dbm plugin

Due to 4. I don't know a way to achive 2. and 3. automatically. Maybe I add the migration file and a documentation in the PR. Opinions?

robertoschwald avatar Feb 01 '18 10:02 robertoschwald