Baseline
Published 15 January 2025
Description
Baselines an existing database, excluding all migrations up to and including baselineVersion.
This command and the baselineVersion setting should be considered together:
baselinerecords a baseline marker in the schema history table, tagging the database withbaselineVersion.- Flyway treats every migration with a version up to and including
baselineVersionas already applied. Only migrations with a higher version will be applied by migrate.
See Baselines for more information.
Usage examples
Baseline via command line
flyway baseline
Baseline via Maven
mvn flyway:baseline
Baseline via Gradle
gradle flywayBaseline
JSON output format
{
"successfullyBaselined": true,
"baselineVersion": "1",
"flywayVersion": "13.12.0",
"database": "testdb",
"warnings": [],
"operation": "baseline"
}
Error codes
This command can produce the following error codes:
This documentation contains proprietary information and is protected by copyright law.
Copyright © 2026 Red Gate Software Limited. All rights reserved