I'm working on a project where we use flyway to upgrade our DB schema.
I'm using flyway through the gradle plugin.
I need to execute a specific function every time a migration ends: we don't want to add the call to every migration manually.
The script will be exactly the same every time, so repeatable migration is a no go (it will be executed again only when the hash of the script changes).
I've tried to use sql callbacks, but they seem not working properly with the gradle plugin: if I run flyway on command line the callback sql is executed correctly (all migrations and callback are in sql dir within flyway distro) while it's not executed in gradle (migrations and callbacks are in directory src/main/db/migration set as filesystem:src/main/db/migration in flyway gradle configuration).
Can anyone help with the correct gradle plugin configuration for flyway or maybe suggest an alternative solution?
Many thanks