I have SQL and Java based migration. I'm trying to use the Flyway callback hook to do something else right after checking, but it doesnβt catch this callback. From the documentation, it looks 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 answer:
public class FruitShopFlywayCallback extends BaseFlywayCallback { @Override public void afterValidate(Connection dataConnection) { System.out.println("it worksssssssss"); } }
My thought was that as soon as the migration was complete, flyway was about to make a callback in this method. I was not sure what I was missing?
source share