I have a generic cleanup script that I'd like to run after every migration. Is there a good way to have this script run after each migration (short of including the script itself as a change every time I do a migration?)
I see that this question has been asked before here Pre- and Post-migration scripts for Flyway and the answer at that time was no, not really.
Has the answer changed at all in the past 1.5 years?
With flyway 3.0 the situation has changed and there are now callback scripts possible. In this situation an afterMigration.sql file could be used to do the cleanups.
See http://flywaydb.org/documentation/callbacks.html for more information.
This has not changed. Use any of the suggested workarounds for now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With