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

Lock Retry Count

Description

At the start of a migration, Flyway will attempt to take a lock to prevent competing instances executing in parallel. If this lock cannot be obtained straight away, Flyway will retry at 1s intervals, until this count is reached, at which point it will abandon the migration. A value of -1 indicates that Flyway should keep retrying indefinitely.

Default

Retry 50 times then fail

Usage

Commandline

./flyway -lockRetryCount=10 migrate

Configuration File

flyway.lockRetryCount=10

Environment Variable

FLYWAY_LOCK_RETRY_COUNT=10

API

Flyway.configure()
    .lockRetryCount(10)
    .load()

Gradle

flyway {
    lockRetryCount = 10
}

Maven

<configuration>
    <lockRetryCount>10</lockRetryCount>
</configuration>