Skip to content
Home › SQL Comparisons › Flyway vs Liquibase
Comparison · Migrations & ORMs

Flyway vs Liquibase

Flyway applies numbered SQL files in order; Liquibase applies changesets from a changelog that can be SQL, XML, YAML or JSON. Both have a free edition and a paid enterprise product, and the free editions differ most on rollback and licence: Flyway Community has no undo command, while Liquibase Community includes rollback by tag, count and date but moved to the Functional Source License with version 5.0.

Last verified October 2026. Versions checked: Flyway 13.9.0 (Flyway Engine), Liquibase 5.0.4 (Community). Licensing and features change; check the official sources for the latest details.

Quick verdict

Short answer

Choose Flyway if your team wants to write plain SQL migration files, name them V1__...sql, V2__...sql and let the tool apply them in order with as little ceremony as possible; the open source Flyway engine is Apache 2.0 licensed. Choose Liquibase if you want database-independent change definitions in XML, YAML or JSON, generated rollback for many change types, preconditions, and rollback commands in the free edition. Note that Liquibase Community 5.0 and later is licensed under FSL-1.1-ALv2, not Apache 2.0. In both products, drift detection, policy checks and targeted rollback or undo sit in the paid editions.

How we know: This comparison is research-based: features, editions, licences and supported databases were checked against Redgate's Flyway documentation and product pages, the Flyway and Liquibase GitHub repositories, and Liquibase's documentation and pricing pages on 7 October 2026. We have not run either tool for this page and make no performance claims.

Flyway is a database migration tool owned by Redgate. It applies migration scripts, mostly plain SQL files, in version order and records each one in a schema history table. Redgate distributes it in several forms: Flyway OSS, built only from the Apache 2.0 licensed open source code; Flyway Community, a free edition that adds some proprietary components and the Flyway Desktop GUI; and the paid Flyway Enterprise. The latest Flyway Engine release in Redgate's release notes is 13.9.0, dated 1 October 2026.

Liquibase is a database change management tool from Liquibase Inc. Changes are written as changesets inside a changelog file, in SQL, XML, YAML or JSON, and Liquibase records each deployed changeset in a DATABASECHANGELOG table. The free edition is Liquibase Community (5.0.4, released 20 August 2026, on GitHub); the commercial product is Liquibase Secure, sold in Starter, Team, Business and Enterprise plans.

Both tools run on Java, both can run from the command line, from Maven or Gradle, from Docker or from a Spring Boot application at startup, and both target the same job: getting the same schema changes into every environment in the same order. If you need a refresher on the statements these tools apply, see DDL commands.

Side by side

AspectFlywayLiquibase
Change format Versioned SQL files (V1__desc.sql), repeatable migrations (R__desc.sql) and Java-based migrations Changelogs in SQL (formatted SQL), XML, YAML or JSON, each holding changesets
Database-independent changes No; you write SQL for your target database Yes, with XML/YAML/JSON change types such as createTable; formatted SQL is database-specific
Rollback in the free edition None: undo migrations need a paid licence (documented as a Teams feature) rollback to a tag, rollback-count and rollback-to-date, plus SQL previews
Targeted rollback Undo the most recent versioned migration (paid) rollback-one-changeset and rollback-one-update in Liquibase Secure only
Diff and generation Script generation from schema comparison in Enterprise diff, diff-changelog and generate-changelog in Community
Drift detection and policy checks Enterprise (drift detection, change reports, policy-as-code) Liquibase Secure (drift detection, policy checks, compliance reporting)
Supported databases Core migrations on 50+ databases, with advanced features on SQL Server, Oracle, PostgreSQL, MySQL and some cloud platforms 65+ databases, including MongoDB and other NoSQL platforms via extensions
Free edition licence Flyway OSS: Apache 2.0. Flyway Community: free, includes proprietary components Community 5.0+: FSL-1.1-ALv2 (each release converts to Apache 2.0 after two years); 4.x releases remain Apache 2.0
Paid edition Flyway Enterprise, 28-day trial, no public prices Liquibase Secure (Starter, Team, Business, Enterprise), no public prices
Main trade-off Simple and SQL-first, but no rollback without paying More features free, but more concepts to learn and a non-OSI licence from 5.0

Key differences

Migration format: numbered SQL files versus changelogs

Flyway's unit of change is a file. A versioned migration is named with a prefix, a version, two underscores and a description, and Flyway applies versions in order. This is the example from Flyway's getting-started material, in generic SQL:

-- db/migration/V1__Create_person_table.sql  (Flyway versioned migration)
create table PERSON (
    ID int not null,
    NAME varchar(100) not null
);

Flyway also supports repeatable migrations (prefix R), which re-run whenever their checksum changes and suit views or procedures, and baseline migrations. Applied migrations are recorded in the schema history table, and editing an applied file makes validate fail on a checksum mismatch.

Liquibase's unit of change is a changeset, identified by an id and an author, inside a changelog. You can write changelogs in formatted SQL, where comments mark each changeset and its rollback:

-- liquibase formatted sql   (Liquibase formatted SQL changelog)

-- changeset liquibase:1
CREATE TABLE person (
    id int primary key,
    name varchar(50) not null
);
-- rollback DROP TABLE person

Or in a database-independent format. This YAML changeset is the createTable example from the Liquibase documentation, trimmed to the main attributes:

# Liquibase YAML changelog
databaseChangeLog:
-  changeSet:
    id:  createTable-example
    author:  liquibase-docs
    changes:
    -  createTable:
        tableName:  person
        columns:
        -  column:
            name:  address
            type:  varchar(255)

The XML equivalent, again from the documentation:

<!-- Liquibase XML changelog (namespace attributes omitted) -->
<databaseChangeLog ...>
    <changeSet author="liquibase-docs" id="createTable-example">
        <createTable tableName="person">
            <column name="address" type="varchar(255)"/>
        </createTable>
    </changeSet>
</databaseChangeLog>

In our view, Flyway's model is easier to pick up for teams that already review SQL, because a migration is exactly the SQL that runs. Liquibase's modelled formats add a layer of abstraction that pays off when one changelog must target several database engines, or when you want Liquibase to work out the rollback for you.

Rollback and undo: what each edition gates

This is the most important practical difference between the free editions.

Flyway. Rollback is done with undo migrations: a file such as U1__Create_person_table.sql that reverses V1__Create_person_table.sql, run by the flyway undo command, which undoes the most recently applied versioned migration. Redgate's documentation marks undo migrations as a Teams edition feature and states that the undo command needs a Teams or Enterprise licence key; Flyway Community and OSS do not include it. Flyway Enterprise can also generate undo scripts. Redgate's own documentation is cautious about undo: it says undo migrations assume the whole migration succeeded, struggle with destructive changes such as drops and deletes, and recommends backward-compatible changes plus a tested backup and restore strategy instead of relying on undo alone.

-- db/migration/U1__Create_person_table.sql  (Flyway undo migration, paid editions)
drop table PERSON;

Liquibase. Liquibase Community includes rollback (to a tag), rollback-to-date and rollback-count, each with a -sql variant that prints the SQL without running it, plus future-rollback-sql commands. For modelled changelogs (XML, YAML, JSON) many change types, such as createTable, have automatic rollback; for formatted SQL changelogs you write the rollback yourself with -- rollback comments. Liquibase Secure adds targeted rollback: rollback-one-changeset reverts a single non-sequential changeset and rollback-one-update reverts one deployment, both requiring --force.

Neither tool can restore data that a migration destroyed unless your rollback script recreates it. Treat rollback as a convenience for schema changes, not as a backup.

Editions and licences, and what changed recently

Flyway. Redgate's current editions and pricing pages list two editions: Flyway Community ("a free database migrations tool", aimed at individual developers and education) and Flyway Enterprise, with a 28-day trial. Separately, Flyway OSS is built only from the open source code, which the GitHub repository licenses under Apache 2.0; Redgate says Community adds proprietary components on top of that code base and includes Flyway Desktop. Redgate's documentation still labels some features as Teams edition, including undo migrations, dry run scripts, cherry picking and state-based deployments, but the editions page no longer lists a Teams edition for purchase. Redgate's feature summary assigns drift detection, change reports, script generation and secrets-manager integration to Enterprise. Redgate's licensing FAQ describes paid licences as per user.

Liquibase. On 30 September 2025 Liquibase announced that, starting with version 5.0, Liquibase Community is licensed under the Functional Source License, Version 1.1, ALv2 Future License (FSL-1.1-ALv2). Liquibase says you may still use it in production, fork and modify it, but third parties may not commercialise it in a way that competes with Liquibase. Each release converts to Apache 2.0 two years after it ships, and all versions released under Apache 2.0 (the 4.x line) stay under Apache 2.0. FSL is a source-available, "Fair Source" licence rather than an OSI-approved open source licence, so check it with whoever approves licences in your organisation. Contributors now sign a CLA. Liquibase 5.0 also stopped bundling extensions and JDBC drivers (you install them with the built-in package manager, liquibase lpm) and raised the minimum Java version to 17. The commercial product, formerly Liquibase Pro, is now Liquibase Secure.

Supported databases

Redgate says Flyway's core migration commands (info, migrate, repair, validate, baseline, undo) work on more than 50 database systems, including PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, SQLite, Snowflake and MongoDB, while its advanced capabilities (comparison, script generation, drift detection) are concentrated on SQL Server, PostgreSQL, Oracle, MySQL and their cloud variants, with Databricks and Snowflake also named on the Enterprise page. Check the supported-databases page for the exact versions and which edition each feature needs.

Liquibase lists support for more than 65 databases, including PostgreSQL, MySQL, MariaDB, Oracle, SQL Server and SQLite, cloud data platforms such as Snowflake, Redshift, BigQuery and Databricks, and NoSQL platforms such as MongoDB, Neo4j and Cassandra, many of them through extensions contributed by the community. Formatted Mongo changelogs are a Liquibase Secure feature.

CI/CD and application integration

Both tools fit the same pipeline pattern: migrations live in Git next to the application, and a pipeline step runs migrate (Flyway) or update (Liquibase) against each environment. Flyway documents a command-line tool for Windows, macOS and Linux, a Docker image (redgate/flyway), a Maven plugin, a Gradle plugin and a Java API. Liquibase documents its CLI, an official Docker image, Maven, Gradle, Ant, Spring Boot, Jenkins and GitHub Actions integrations.

Spring Boot can run either tool on startup: add Flyway and it applies V<VERSION>__<NAME>.sql scripts from classpath:db/migration; add spring-boot-starter-liquibase and it reads db/changelog/db.changelog-master.yaml by default. Both tools can also print the SQL they would run for review before deployment: Liquibase Community through update-sql and the rollback -sql commands, Flyway through dry run scripts, which Redgate lists in its paid editions.

The governance layer is where the paid editions differ from the free ones. Flyway Enterprise adds drift detection, change reports and policy-as-code rules; Liquibase Secure adds policy checks, drift detection, flow files for orchestrating steps, structured logging, compliance reporting and secrets-manager integration.

Pricing and licensing

Flyway. Flyway OSS and Flyway Community are free. Flyway Enterprise is paid, with a 28-day free trial; Redgate's pricing page did not show list prices in October 2026, so you need a quote. Redgate's licensing FAQ says paid licences are priced per user, counting people who install the tools or author database changes, not those who only review deployments or maintain pipelines.

Liquibase. Liquibase Community is free. Liquibase Secure is sold in Starter, Team, Business and Enterprise plans, which differ in features (for example, role-based access control from Business), the number of database types (1, 1, 2 and 4) and database targets (250, 500, 750 and 2,000). No prices were published on the pricing page in October 2026; every Secure plan requires a Professional Services package, and Starter is limited to companies with under USD 1 billion in annual revenue.

Pricing checked on the vendors' official pages on 7 October 2026. Prices change; confirm before buying.

Where each one leads

Flyway strengths

  • Plain SQL migration files: what you review is exactly what runs
  • Very small set of concepts (versioned, repeatable and baseline migrations, schema history table)
  • Flyway OSS remains under the Apache 2.0 licence
  • Works on 50+ databases for core migrations, with Java-based migrations for logic that SQL cannot express
  • Enterprise edition adds comparison-based script generation, drift detection and policy checks from Redgate

Liquibase strengths

  • Changelogs in SQL, XML, YAML or JSON, with database-independent change types
  • Rollback by tag, count and date in the free Community edition, with SQL previews
  • Automatic rollback for many modelled change types
  • diff, diff-changelog and generate-changelog in Community for comparing databases and capturing an existing schema
  • Preconditions, contexts and labels for controlling where and when changesets run

Limitations

Flyway limitations

  • No undo or dry run in Flyway Community or OSS; Redgate documents them as paid features
  • Drift detection and script generation require Flyway Enterprise
  • Migrations are database-specific SQL, so multi-engine products need separate scripts
  • Edition naming is confusing: the docs still mention a Teams edition that the editions page no longer lists
  • Enterprise prices are not published

Liquibase limitations

  • Liquibase Community 5.0 and later is under FSL-1.1-ALv2, which is not an OSI-approved open source licence
  • Liquibase 5.0 no longer bundles drivers and extensions; you install them with liquibase lpm
  • More concepts to learn (changesets, changelogs, contexts, labels, preconditions) than Flyway
  • Formatted SQL changelogs get no automatic rollback; you write each rollback by hand
  • Targeted rollback, drift detection and policy checks need Liquibase Secure, which has no published prices

When to choose each

Choose Flyway if

  • Your team writes and reviews SQL and wants migrations to be plain .sql files
  • You want the smallest learning curve for versioned migrations on a single database engine
  • An Apache 2.0 licensed engine (Flyway OSS) is a requirement
  • You already use Redgate tools for SQL Server and want comparison-based script generation in Enterprise

Choose Liquibase if

  • You need rollback commands without buying a commercial licence
  • One set of changes must deploy to several database engines
  • You want Liquibase to generate rollback for common changes such as createTable
  • You need diff and changelog generation from an existing database in the free edition
  • You want preconditions, contexts or labels to control deployments per environment

When neither is right

  • Your application is written in Python with SQLAlchemy models: Alembic generates candidate migrations from your models; see also Liquibase vs Alembic.
  • Your application is a TypeScript project using an ORM: the ORM's own migration tool (Prisma Migrate or Drizzle Kit) may be enough; see Prisma vs Drizzle ORM.
  • You only have a handful of manual changes to one database: a reviewed DDL script in source control may be enough; see DDL commands.
  • You work only on SQL Server and want declarative, state-based projects: Microsoft's SQL Server database projects (in SSMS 22 and VS Code) are an alternative to migration tools; see the SSMS review.

Final recommendation

Bottom line

For a team on one database engine that thinks in SQL, Flyway is the simpler tool: numbered SQL files, a history table, and an Apache 2.0 open source engine. Budget for Flyway Enterprise if you need undo, dry runs or drift detection. Liquibase gives you more in the free edition, notably rollback commands, generated rollback for modelled changes, and diff tooling, and it suits teams that deploy to several engines. Its Community edition is now under FSL-1.1-ALv2, which is fine for most internal use but worth checking if you embed or redistribute it. If rollback without a licence matters, Liquibase has the edge; if simplicity matters most, Flyway does.

Frequently asked questions

Is Liquibase still open source?

Not under an OSI-approved licence for current releases. Since version 5.0 (30 September 2025), Liquibase Community is licensed under FSL-1.1-ALv2. You can use it in production and modify it, but you may not commercialise it in competition with Liquibase. Each release converts to Apache 2.0 two years after release, and 4.x releases remain Apache 2.0.

Does Flyway Community support rollback?

No. Rollback in Flyway is done with undo migrations and the undo command, which Redgate documents as requiring a Teams or Enterprise licence. With Flyway Community you roll back by writing a new forward migration, or by restoring a backup.

Can Liquibase use plain SQL files?

Yes. A formatted SQL changelog starts with -- liquibase formatted sql and marks each change with -- changeset author:id. You must write rollbacks yourself with -- rollback comments, because automatic rollback is only available for modelled changelogs (XML, YAML, JSON). You can also include existing SQL files with the sqlFile change type.

Is Flyway Teams still available?

Redgate's current editions and pricing pages list only Flyway Community and Flyway Enterprise. The documentation still labels some features, such as undo migrations, as Teams edition features. If you hold a Teams licence, check its terms with Redgate; for new purchases, plan around Enterprise.

Can I use Flyway or Liquibase with Spring Boot?

Yes. Spring Boot runs Flyway migrations on startup when Flyway is on the classpath (scripts in classpath:db/migration by default) and Liquibase changelogs when spring-boot-starter-liquibase is added (db/changelog/db.changelog-master.yaml by default).

Can I migrate from Flyway to Liquibase, or the other way round?

Both tools can start from an existing database. Liquibase can capture a schema with generate-changelog and mark it as deployed with changelog-sync; Flyway uses baseline to start versioning an existing database. Plan the switch at a release boundary so that both histories agree on what has been applied.

Sources

Checked October 2026.

How we research comparisons: our editorial method.

More comparisons

Browse all SQL comparisons or the tools directory.