public interface FlywayCallback
BaseFlywayCallback
. To ensure backward compatibility, you are encouraged
to subclass that class instead of implementing this interface directly.
If a callback also implements the ConfigurationAware
interface,
a FlywayConfiguration
object will automatically be injected before
calling any methods, giving the callback access to the core flyway configuration. BaseFlywayCallback
already implements ConfigurationAware
Each callback method will run within its own transaction.
Modifier and Type | Method and Description |
---|---|
void |
afterBaseline(Connection connection)
Runs after the baseline task executes.
|
void |
afterClean(Connection connection)
Runs after the clean task executes.
|
void |
afterEachMigrate(Connection connection,
MigrationInfo info)
Runs after each migration script is executed.
|
void |
afterInfo(Connection connection)
Runs after the info task executes.
|
void |
afterMigrate(Connection connection)
Runs after the migrate task executes.
|
void |
afterRepair(Connection connection)
Runs after the repair task executes.
|
void |
afterValidate(Connection connection)
Runs after the validate task executes.
|
void |
beforeBaseline(Connection connection)
Runs before the baseline task executes.
|
void |
beforeClean(Connection connection)
Runs before the clean task executes.
|
void |
beforeEachMigrate(Connection connection,
MigrationInfo info)
Runs before each migration script is executed.
|
void |
beforeInfo(Connection connection)
Runs before the info task executes.
|
void |
beforeMigrate(Connection connection)
Runs before the migrate task executes.
|
void |
beforeRepair(Connection connection)
Runs before the repair task executes.
|
void |
beforeValidate(Connection connection)
Runs before the validate task executes.
|
void beforeClean(Connection connection)
connection
- A valid connection to the database.void afterClean(Connection connection)
connection
- A valid connection to the database.void beforeMigrate(Connection connection)
connection
- A valid connection to the database.void afterMigrate(Connection connection)
connection
- A valid connection to the database.void beforeEachMigrate(Connection connection, MigrationInfo info)
connection
- A valid connection to the database.info
- The current MigrationInfo for this migration.void afterEachMigrate(Connection connection, MigrationInfo info)
connection
- A valid connection to the database.info
- The current MigrationInfo for this migration.void beforeValidate(Connection connection)
connection
- A valid connection to the database.void afterValidate(Connection connection)
connection
- A valid connection to the database.void beforeBaseline(Connection connection)
connection
- A valid connection to the database.void afterBaseline(Connection connection)
connection
- A valid connection to the database.void beforeRepair(Connection connection)
connection
- A valid connection to the database.void afterRepair(Connection connection)
connection
- A valid connection to the database.void beforeInfo(Connection connection)
connection
- A valid connection to the database.void afterInfo(Connection connection)
connection
- A valid connection to the database.Copyright © 2017. All rights reserved.