SBT Task: flywayRepair

Repairs the Flyway metadata table. This will perform the following actions:

Remove any failed migrations on databases without DDL transactions
(User objects left behind must still be cleaned up manually)

Correct wrong checksums

Usage

> sbt flywayRepair

Configuration

Parameter

Required

Default

Description

flywayUrl

YES

The jdbc url to use to connect to the database

flywayDriver

NO

Auto-detected based on url

The fully qualified classname of the jdbc driver to use
to connect to the database

flywayUser

NO

The user to use to connect to the database

flywayPassword

NO

The password to use to connect to the database

flywaySchemas

NO

default schema of the connection

Case-sensitive list of schemas managed by Flyway.
The first schema will be the one containing the metadata table.

flywayTable

NO

schema_version

The name of Flyway's metadata table.By
default (single-schema mode) the metadata table is placed in the default schema for the connection
provided by the datasource.When the flyway.schemas property is set (multi-schema mode),
the metadata table is placed in the first schema of the list.

flywayLocations

NO

filesystem:src/main/resources/db/migration

Locations to scan recursively for migrations. The location type is determined by its prefix.
Unprefixed locations or locations starting with classpath: point to a package on the
classpath and may contain both sql and java-based migrations.
Locations starting with filesystem: point to a directory on the filesystem and may only
contain sql migrations.

flywaySqlMigrationPrefix

NO

V

The file name prefix for Sql migrations

flywayRepeatableSqlMigrationPrefix

NO

R

The file name prefix for repeatable Sql migrations

flywaySqlMigrationSeparator

NO

__

The file name separator for Sql migrations

flywaySqlMigrationSuffix

NO

.sql

The file name suffix for Sql migrations

flywayEncoding

NO

UTF-8

The encoding of Sql migrations

flywayPlaceholderReplacement

NO

true

Whether placeholders should be replaced

flywayPlaceholders

NO

Placeholders to replace in Sql migrations

flywayPlaceholderPrefix

NO

${

The prefix of every placeholder

flywayPlaceholderSuffix

NO

}

The suffix of every placeholder

flywayResolvers

NO

Fully qualified class names of custom
MigrationResolver
implementations to be used in addition to the built-in ones for resolving Migrations to apply.

flywaySkipDefaultResolvers

NO

false

Whether default built-in resolvers (sql, jdbc and spring-jdbc) should be skipped. If true, only custom resolvers are used.

flywayCallbacks

NO

Fully qualified class names of
FlywayCallback
implementations to use to hook into the Flyway lifecycle.

flywaySkipDefaultCallbacks

NO

false

Whether default built-in callbacks (sql) should be skipped. If true, only custom callbacks are used.