Callback Events - Native Connectors
Published 30 January 2025
This page lists the callback events that are compatible with Native Connectors.
List of events
| Migrate | Execution |
|---|---|
| beforeMigrate | Before Migrate runs |
| beforeEachMigrate | Before every single migration during Migrate |
| afterEachMigrate | After every single successful migration during Migrate |
| afterEachMigrateError | After every single failed migration during Migrate |
| afterMigrate | After successful Migrate runs |
| afterMigrateApplied | After successful Migrate runs where at least one migration has been applied |
| afterMigrateError | After failed Migrate runs |
| Undo | Execution |
|---|---|
| beforeUndo Flyway Teams |
Before Undo runs |
| beforeEachUndo Flyway Teams |
Before every single migration during Undo |
| afterEachUndo Flyway Teams |
After every single successful migration during Undo |
| afterEachUndoError Flyway Teams |
After every single failed migration during Undo |
| afterUndo Flyway Teams |
After Undo command succeeds |
| afterUndoError Flyway Teams |
After Undo command fails |
| Clean | Execution |
|---|---|
| beforeClean | Before Clean runs |
| afterClean | After successful Clean runs |
| afterCleanError | After failed Clean runs |
| Info | Execution |
|---|---|
| beforeInfo | Before Info runs |
| afterInfo | After Info command succeeds |
| afterInfoError | After Info command fails |
Note: It is strongly discouraged to include any write-related callbacks for the Info command. The Info command may be internally triggered by Flyway.
| Validate | Execution |
|---|---|
| beforeValidate | Before Validate runs |
| afterValidate | After successful Validate runs |
| afterValidateError | After failed Validate runs |
| Baseline | Execution |
|---|---|
| beforeBaseline | Before Baseline runs |
| afterBaseline | After Baseline command succeeds |
| afterBaselineError | After Baseline command fails |
| Repair | Execution |
|---|---|
| beforeRepair | Before Repair runs |
| afterRepair | After Repair command succeeds |
| afterRepairError | After Repair command fails |
| Name | Execution |
|---|---|
| afterConnect | Immediately after Flyway connects to the database |