Redgate Flyway

For PostgreSQL users - where are your DBs hosted?

Flyway Undo SQL Migration Prefix Setting

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

Type

String

Default

"U"

Usage

Flyway Desktop

This can't be configured via Flyway Desktop, although it will be honoured.

Command-line

./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?