New! – Spin up instant copies of your dev databases in the cloud for free Learn more

Flyway Documentation

Poll

State Script Prefix

Flyway Teams

Description

The file name prefix for state scripts.

State scripts represent all migrations with version <= current state script version while keeping older migrations if needed for upgrading older deployments.

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

Default

S

Usage

Commandline

./flyway -stateScriptPrefix="IB" info

Configuration File

flyway.stateScriptPrefix=IB

Environment Variable

FLYWAY_STATE_SCRIPT_PREFIX=IB

API

Flyway.configure()
    .stateScriptPrefix("IB")
    .load()

Gradle

flyway {
    stateScriptPrefix = 'IB'
}

Maven

<configuration>
    <stateScriptPrefix>IB</stateScriptPrefix>
</configuration>