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.Dismiss alert
At present, a Sql Callback can execute only one .sql file eg afterMigrate.sql. This file can't import code from another .sql files or 'call' another .sql file. I would like to execute multiple .sql files in a callback.
At present, I use Oracle SqlPlus to execute a list of files after migration but I would prefer if I could do this with Flyway.
Have flyway scan for callback files named something like this: afterMigrate.sql.list
Execute all the .sql files listed.
# This is a comment
# Execute this file
# Execute another file
# Scan this folder and apply every .sql file
The text was updated successfully, but these errors were encountered:
There is one additional benefit of having more that one hook:
We often combine different locations directories and right now we can use only 'global' hooks
and not hooks within each location.
(I would prefer the afterMigrate post or prefix together with ordering by numbers.)
It would be nice to have callbacks before and after a specific migration only.
An example of the file name could be: prefixVERSIONseparatorDESCRIPTIONseparatorCALLBACKsuffix, where CALLBACK could be beforeMigrate or afterMigrate.
This could be used to insert test data after schema creation to allow that the next migrations could be run with existing data. For example, having the sql scripts for the migration in an sql location and the callbacks on other location like test, running flyway for migrations only with the sql location and for testing with the sql,test location.