saw303 / grails-flyway

Flyway support for Grails
Apache License 2.0
6 stars 5 forks source link

flyway runs after db schema validation in grails 3.3 #6

Open bp-FLN opened 4 years ago

bp-FLN commented 4 years ago

While upgrading our app to grails 3.3.11 we noticed that flyway runs after the db schema validation now. After some googling we found this grails issue and also your SO question. From there it looks like this has been fixed in grails 3.3.1, but for us the db schema validation still runs before flyway migration. So the patches from the github issue don't seem to fix the issue. We also tried grails 3.3.1 but same issue there.

I just debugged some more and it looks like the code in GrailsFlywayGrailsPlugin#doWithSpring is executed first, then db schema validation happens (via SchemaManagementToolCoordinator) and last the Flyway constructor is called.

Any ideas?

saw303 commented 4 years ago

The call order is framework related. Have you tried to use a more recent Grails 3.3.x version?

bp-FLN commented 4 years ago

Yes, we noticed this while upgrading from 3.1 to 3.3.11 (currently latest version). We also tried 3.3.1 (the one mentioned in the grails-core issue) but exactly same (broken) behaviour.