Interface FlywayCallback

  • All Known Implementing Classes:
    BaseFlywayCallback

    @Deprecated
    public interface FlywayCallback
    Deprecated.
    Use Callback instead. Will be removed in Flyway 6.0.
    This is the main callback interface that should be implemented to get access to flyway lifecycle notifications. Simply add code to the callback method you are interested in having. A convenience implementation with all methods doing nothing is provided with 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.

    • Method Detail

      • beforeClean

        @Deprecated
        void beforeClean​(Connection connection)
        Deprecated.
        Use Callback instead. Will be removed in Flyway 6.0.
        Runs before the clean task executes.
        Parameters:
        connection - A valid connection to the database.
      • afterClean

        @Deprecated
        void afterClean​(Connection connection)
        Deprecated.
        Use Callback instead. Will be removed in Flyway 6.0.
        Runs after the clean task executes.
        Parameters:
        connection - A valid connection to the database.
      • beforeMigrate

        @Deprecated
        void beforeMigrate​(Connection connection)
        Deprecated.
        Use Callback instead. Will be removed in Flyway 6.0.
        Runs before the migrate task executes.
        Parameters:
        connection - A valid connection to the database.
      • afterMigrate

        @Deprecated
        void afterMigrate​(Connection connection)
        Deprecated.
        Use Callback instead. Will be removed in Flyway 6.0.
        Runs after the migrate task executes.
        Parameters:
        connection - A valid connection to the database.
      • beforeUndo

        @Deprecated
        void beforeUndo​(Connection connection)
        Deprecated.
        Use Callback instead. Will be removed in Flyway 6.0.
        Runs before the undo task executes.
        Parameters:
        connection - A valid connection to the database.
      • beforeEachUndo

        @Deprecated
        void beforeEachUndo​(Connection connection,
                            MigrationInfo info)
        Deprecated.
        Use Callback instead. Will be removed in Flyway 6.0.
        Runs before each migration script is undone.
        Parameters:
        connection - A valid connection to the database.
        info - The current MigrationInfo for the migration to be undone.
      • afterEachUndo

        @Deprecated
        void afterEachUndo​(Connection connection,
                           MigrationInfo info)
        Deprecated.
        Use Callback instead. Will be removed in Flyway 6.0.
        Runs after each migration script is undone.
        Parameters:
        connection - A valid connection to the database.
        info - The current MigrationInfo for the migration just undone.
      • afterUndo

        @Deprecated
        void afterUndo​(Connection connection)
        Deprecated.
        Use Callback instead. Will be removed in Flyway 6.0.
        Runs after the undo task executes.
        Parameters:
        connection - A valid connection to the database.
      • beforeEachMigrate

        @Deprecated
        void beforeEachMigrate​(Connection connection,
                               MigrationInfo info)
        Deprecated.
        Use Callback instead. Will be removed in Flyway 6.0.
        Runs before each migration script is executed.
        Parameters:
        connection - A valid connection to the database.
        info - The current MigrationInfo for this migration.
      • afterEachMigrate

        @Deprecated
        void afterEachMigrate​(Connection connection,
                              MigrationInfo info)
        Deprecated.
        Use Callback instead. Will be removed in Flyway 6.0.
        Runs after each migration script is executed.
        Parameters:
        connection - A valid connection to the database.
        info - The current MigrationInfo for this migration.
      • beforeValidate

        @Deprecated
        void beforeValidate​(Connection connection)
        Deprecated.
        Use Callback instead. Will be removed in Flyway 6.0.
        Runs before the validate task executes.
        Parameters:
        connection - A valid connection to the database.
      • afterValidate

        @Deprecated
        void afterValidate​(Connection connection)
        Deprecated.
        Use Callback instead. Will be removed in Flyway 6.0.
        Runs after the validate task executes.
        Parameters:
        connection - A valid connection to the database.
      • beforeBaseline

        @Deprecated
        void beforeBaseline​(Connection connection)
        Deprecated.
        Use Callback instead. Will be removed in Flyway 6.0.
        Runs before the baseline task executes.
        Parameters:
        connection - A valid connection to the database.
      • afterBaseline

        @Deprecated
        void afterBaseline​(Connection connection)
        Deprecated.
        Use Callback instead. Will be removed in Flyway 6.0.
        Runs after the baseline task executes.
        Parameters:
        connection - A valid connection to the database.
      • beforeRepair

        @Deprecated
        void beforeRepair​(Connection connection)
        Deprecated.
        Use Callback instead. Will be removed in Flyway 6.0.
        Runs before the repair task executes.
        Parameters:
        connection - A valid connection to the database.
      • afterRepair

        @Deprecated
        void afterRepair​(Connection connection)
        Deprecated.
        Use Callback instead. Will be removed in Flyway 6.0.
        Runs after the repair task executes.
        Parameters:
        connection - A valid connection to the database.
      • beforeInfo

        @Deprecated
        void beforeInfo​(Connection connection)
        Deprecated.
        Use Callback instead. Will be removed in Flyway 6.0.
        Runs before the info task executes.
        Parameters:
        connection - A valid connection to the database.
      • afterInfo

        @Deprecated
        void afterInfo​(Connection connection)
        Deprecated.
        Use Callback instead. Will be removed in Flyway 6.0.
        Runs after the info task executes.
        Parameters:
        connection - A valid connection to the database.