Flyway SQL Migration Separator Setting
Published 15 January 2025
Description
The file name separator for Sql migrations.
Versioned SQL migrations have the following file name structure: prefixVERSIONseparatorDESCRIPTIONsuffix, which using the defaults translates to V1.1__My_description.sql
Type
String
Default
"__"
Usage
Flyway Desktop
This can't be configured via Flyway Desktop, although it will be honoured.
Command-line
./flyway -sqlMigrationSeparator="-" info
TOML Configuration File
[flyway]
sqlMigrationSeparator = "-"
Configuration File
flyway.sqlMigrationSeparator=-
Environment Variable
FLYWAY_SQL_MIGRATION_SEPARATOR=-
API
Flyway.configure()
.sqlMigrationSeparator("-")
.load()
Gradle
flyway {
sqlMigrationSeparator = '-'
}
Maven
<configuration>
<sqlMigrationSeparator>-</sqlMigrationSeparator>
</configuration>