Flyway

Undo SQL Migration Prefix

Undo SQL Migration Prefix

Flyway Teams

Description

The file name prefix for undo SQL migrations.

Undo SQL migrations are responsible for undoing the effects of the versioned migration with the same version.

They have the following file name structure: prefixVERSIONseparatorDESCRIPTIONsuffix, which using the defaults translates to U1.1__My_description.sql

Default

U

Usage

Commandline

./flyway -undoSqlMigrationPrefix="B" info

TOML Configuration File

[flyway]
undoSqlMigrationPrefix = "B"

Configuration File

flyway.undoSqlMigrationPrefix=B

Environment Variable

FLYWAY_UNDO_SQL_MIGRATION_PREFIX=B

API

UndoConfigurationExtension undoConfigurationExtension = flyway.getConfiguration().getPluginRegister().getPlugin(UndoConfigurationExtension.class);
undoConfigurationExtension.setUndoSqlMigrationPrefix("B");

Gradle

flyway {
    pluginConfiguration = [
        undoSqlMigrationPrefix = 'B'
    ]
}

Maven

<configuration>
    <pluginConfiguration>
        <undoSqlMigrationPrefix>B</undoSqlMigrationPrefix>
    </pluginConfiguration>
</configuration>

Didn't find what you were looking for?