I have both SQL and Java based migrations. I am trying to use the Flyway callback hook to do something else right after the validation is done, but it is not catching this callback. From the documentation, it seems like it's as simple as the following.
Here is my file structure:
-java
--db
---migrations
----V1__apple <----java based
--FruitShopFlywayCallback.java <---- Callback class
-resources
--migrations
--- V1__orange.sql <----sql based
My callback:
public class FruitShopFlywayCallback extends BaseFlywayCallback {
@Override
public void afterValidate(Connection dataConnection) {
System.out.println("it worksssssssss");
}
}
My thought was that once the migration is done, flyway was going to callback into this method. I was not sure what am I missing?