You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
This appears to affect default SQL callbacks on the command line as well (certainly the beforeMigrate and afterMigrate ones). I'm using V4.2.0 and have placed beforeMigrate.sql and afterMigrate.sql in the flyway location and am seeing duplicate 'Executing SQL callback;' messages.
It appears that what I was seeing is that the beforeMigrate.sql and afterMigrate.sql scripts are run for the clean and the migrate command when running 'flyway clean migrate'. But, the additional executions are not before or after the clean phase, they are around the migrate phase.
I realised this when I ran a migrate on a fully up-to-date schema (I wanted to check whether the callbacks are executed when there are no migrations that are required to be run). In this situation there is a single execution of the relevant script rather than two. Adding an (unnecessary) repair to the command line (flyway repair clean migrate) results in three executions of each of the beforeMigrate and afterMigrate callback scripts.