Redgate Summit – The Database DevOps Transformation Watch now
PASS Data Community Summit logo

PASS Data Community Summit

A hybrid conference in Seattle and online

15-18 November

Flyway Documentation

This documentation is deprecated. The new documentation can now be found on documentation.red-gate.com

Poll

Callbacks

Description

Comma-separated list of fully qualified class names of Callback implementations to use to hook into the Flyway lifecycle, or packages to scan for these classes. Ensure the class or package is available on the classpath (see Adding to the classpath).

Note: SQL callbacks matching the correct name pattern are loaded from locations (see Callbacks). This configuration parameter is only used for loading java callbacks. To disable loading sql callbacks, see skipDefaultCallbacks.

Default

db/callback

Usage

Commandline

./flyway -callbacks="my.callback.FlywayCallback,my.package.to.scan" info

Configuration File

flyway.callbacks=my.callback.FlywayCallback,my.package.to.scan

Environment Variable

FLYWAY_CALLBACKS=my.callback.FlywayCallback,my.package.to.scan

API

Flyway.configure()
    .callbacks("my.callback.FlywayCallback", "my.package.to.scan")
    .load()

Gradle

flyway {
    callbacks = ['my.callback.FlywayCallback', 'my.package.to.scan']
}

Maven

<configuration>
    <callbacks>my.callback.FlywayCallback,my.package.to.scan</callbacks>
</configuration>