-1

How to create script or Flyway can be configured to call it every time using a SQL callback ??

1 Answers1

0

flyway has already a lot of callbacks depending when you want your script to run, for exemple if you want your script to run after each successfull migration you can create a file named:

afterMigrate__my_script_to_run_after_each_migration.sql

Flyway will automatically call that script after the migration completes successfully.

You can find the list of flyway callbacks here, note that some of them are limited to the Flyway teams edition.

https://flywaydb.org/documentation/concepts/callbacks

Cyrille MODIANO
  • 2,246
  • 2
  • 21
  • 33
  • i m using evolve.net library how can i use with it ? How to Use afterMigrate__ or call back in evolve ?? my issue is i want use sql call back after each migrate please let me know how i can use it? i want to use my own afterMigrate__permission.sql call back how can i use it – Maulik Dave Sep 23 '21 at 15:46
  • I dont know evolve but flyway callbacks are independant of the framework you use, if you want to call a script after each migration script then create a script starting with: afterEachMigrate__ and place it in the same directory you put your migration files, nothing else to do, flyway will call it every time a migration scripts runs. – Cyrille MODIANO Sep 23 '21 at 17:00