Redgate Flyway

Baseline

Description

Baselines an existing database, excluding all migrations up to and including baselineVersion.

This command and the baselineVersion setting should be considered together:

  • baseline records a baseline marker in the schema history table, tagging the database with baselineVersion.
  • Flyway treats every migration with a version up to and including baselineVersion as 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


Didn't find what you were looking for?