Flyway vs Liquibase
Flyway vs Liquibase compared for 2026: Redgate Flyway 13.13 (plain-SQL versioned migrations, Community free, undo and dry runs paid) vs Liquibase 5.0.4 (changesets in SQL, XML, YAML or JSON, Community under FSL since 5.0, rollback to tag or count free, Secure paid). Includes a run we did on PostgreSQL 16: the same schema in both, undo vs rollback, checksum edits, contexts and what happens when a migration is killed mid-way.
Quick Answer
Flyway and Liquibase are the two most used database migration tools for JVM and polyglot teams. Flyway 13.13.0 (19 November 2026, Redgate) runs numbered SQL files in order (V1__, V2__...) and records them in a history table; the Community edition is free, while undo migrations, dry-run scripts, cherry-picking and drift detection need a paid edition. Liquibase Community 5.0.4 (20 August 2026) runs changesets from changelogs in SQL, XML, YAML or JSON, and its free edition can roll back to a tag, a date or by count, filter by contexts and labels, and print the SQL before running it; since 5.0 it is licensed under the Functional Source License, which turns into Apache 2.0 two years after each release. In our PostgreSQL 16 run both tools caught an edited, already-applied migration by checksum. When we killed each mid-migration with kill -9, Flyway's re-run needed no manual step, while Liquibase left its lock table set and waited until we ran release-locks. Pick Flyway for SQL-first teams that roll forward; pick Liquibase if you need free rollback, multi-environment filtering or database-neutral changelogs.
Last updated November 20, 2026. Covers Flyway 13.13.0 (19 November 2026) and Liquibase Community 5.0.4 (20 August 2026), with Redgate's feature summary and command docs, Liquibase's FSL announcement, Community vs Secure table and pricing page, all read on 20 November 2026, plus a PostgreSQL 16 run of both tools we did that day.
| Feature | Flyway | Liquibase |
|---|---|---|
| Licence of the Free Edition | Engine source Apache-2.0 (flyway/flyway ~10.2k stars); CLI download under Redgate EULA, runs as Community Edition when not signed in | Community 5.x: FSL-1.1-ALv2 (Apache 2.0 two years after each release); 4.x and earlier stay Apache 2.0; liquibase/liquibase ~5.6k stars |
| Latest Release (Nov 2026) | 13.13.0 on 19 Nov 2026 (13.12.2 on 12 Nov, 13.12.1 on 5 Nov) | Community 5.0.4 on 20 Aug 2026 (credential redaction, opt-in lockdown flags); nightly builds on main |
| Editions & Pricing | Community free; Enterprise by quote (Redgate site); docs feature table also lists Teams | Community free; Secure plans Starter (companies under $1B revenue), Team, Business, Enterprise, prices not published |
| Migration Format | SQL files V<version>__<desc>.sql, repeatable R__ files, undo U files (paid), Java migrations, script migrations (.sh, .py, .ps1 and more) | Changelogs in formatted SQL, XML, YAML or JSON; Formatted Mongo in Secure |
| Ordering & Tracking | By version number; flyway_schema_history with checksum per script | Changelog order; DATABASECHANGELOG with id, author, file and checksum |
| Rollback / Undo (free edition) | None (undo is Teams/Enterprise); roll forward with a new migration | rollback (to tag), rollback-to-date, rollback-count, plus -sql previews; formatted SQL needs --rollback lines |
| Rollback (paid edition) | flyway undo runs your U files; Enterprise can generate undo scripts for advanced-capability databases | Secure adds targeted rollback of a single changeset or a whole deployment |
| Preview SQL Before Deploy | Dry run script is Teams/Enterprise; Community has info only | update-sql, rollback-sql and similar in Community |
| Per-environment Filtering | Named environments in flyway.toml; per-environment script limits in all editions | Contexts and labels on changesets in Community; flow files in Secure |
| Edited Migration Detection | Validate fails on checksum mismatch; fix with repair or revert | ValidationFailedException listing old and new checksum per changeset |
| Drift Detection | Enterprise only (check -drift) | Community: manual diff between two databases; Secure: scheduled drift detection and reconciliation |
| Concurrency Lock | Database-level locking; on PostgreSQL an advisory lock that is released when the session ends | Row in DATABASECHANGELOGLOCK; needs release-locks if a process dies holding it |
| Databases | 50+ per docs (60+ per Redgate site); advanced features for SQL Server, Oracle, PostgreSQL, MySQL, Snowflake, Databricks | 70+ database types per Liquibase site |
| Code / Script Migrations | Java-based migrations and script migrations in all editions; callbacks limited in Community | XML/YAML/JSON change types, customChange Java classes, executeCommand (lockdown flags can disable these since 5.0.4) |
| Build Tool & App Integration | CLI, Maven, Gradle, Java API, Docker image (redgate/flyway); Flyway Desktop GUI (preview in Community) | CLI, Maven, Gradle, Java API; VS Code extension and MCP server in Secure |
| Secrets Managers | Enterprise only | Secure only (HashiCorp Vault, AWS Secrets Manager and others) |
| Policy / Code Review | SQLFluff code review in Community; custom rules and pipeline gates in paid editions | Manual review in Community; built-in and custom policy checks in Secure |
| Download Size (Linux) | 613.7 MB (with JRE) / 551.5 MB (no JRE) tarball | 8.8 MB tarball (11 MB unpacked, H2 driver only) |
| Release Cadence | Roughly weekly (13.10.3 on 15 Oct to 13.13.0 on 19 Nov 2026) | Roughly quarterly (5.0.2 Mar, 5.0.3 May, 5.0.4 Aug 2026) |
| Our Run: kill -9 mid-migration (PostgreSQL 16) | Advisory lock released; table rolled back; re-run applied V4 with no manual step | Lock row stayed locked; re-run blocked ('Waiting for changelog lock') until release-locks |
Flyway
Flyway is a database migration tool created in 2010 and now owned by Redgate. It applies versioned SQL scripts (V1__name.sql, V2__name.sql) in order, plus repeatable scripts that re-run when they change, and records each in a flyway_schema_history table with a checksum. The open-source engine on GitHub is Apache-2.0; the command-line download is Redgate's edition, which runs as Community when you are not signed in and unlocks Teams or Enterprise features with a licence. Redgate now markets Flyway Enterprise around governance: drift detection, policy checks, generated scripts and audit trails.
Pros
- Plain SQL files named by version: nothing to learn beyond the naming convention, and reviewers read exactly what will run
- Free Community edition covers migrate, info, validate, repair, baseline and clean, with Java and shell/Python script migrations
- Uses a PostgreSQL advisory lock: after we killed a migration with kill -9, the re-run went through with no manual step
- Very frequent releases (13.10.3 to 13.13.0 in five weeks) and Maven, Gradle, Java API and Docker image support
- Enterprise adds drift detection, change reports, generated migration and undo scripts, and a schema-comparison engine for SQL Server, Oracle, PostgreSQL, MySQL, Snowflake and Databricks
Cons
- No rollback in Community: flyway undo failed in our run with 'Upgrade required: undo is not supported by Community' (exit code 35)
- Dry-run SQL preview, cherry-picking and deploy rules are paid; check -dryrun was refused in Community too
- Enterprise pricing is quote-only, and the public site no longer lists a Teams price even though the docs still have a Teams column
- Large download: 614 MB for the Linux bundle with JRE, 552 MB without, mostly the Redgate comparison engine and drivers
- The CLI binary is distributed under Redgate's EULA, not Apache-2.0, even in Community mode
Best For
SQL-first teams that write migrations by hand and fix mistakes by rolling forward, JVM apps that run migrations on startup, and organisations already buying Redgate tooling for SQL Server or Oracle.
Liquibase
Liquibase is a database change management tool that applies changesets listed in a changelog, which can be formatted SQL, XML, YAML or JSON. Each changeset is identified by id, author and file and recorded in a DATABASECHANGELOG table with a checksum, and XML, YAML and JSON changelogs can use database-neutral change types that Liquibase turns into SQL. Liquibase Community moved from Apache 2.0 to the Functional Source License with version 5.0 in September 2025; the commercial edition, Liquibase Secure, adds policy checks, flow files, targeted rollback, drift detection and reporting.
Pros
- Rollback in the free edition: rollback to a tag, rollback-to-date and rollback-count, with -sql variants to preview; our rollback-count 1 removed the seed data in one command
- Contexts and labels: our --contexts=prod run skipped a dev-only seed changeset
- update-sql and rollback-sql print exactly what will run, without a paid licence
- Changelogs in SQL, XML, YAML or JSON; the non-SQL formats describe changes once for many databases
- Small download: 8.8 MB tarball, 11 MB unpacked
Cons
- Lock row in a table: after kill -9 mid-changeset, DATABASECHANGELOGLOCK stayed locked and the re-run waited until we ran release-locks
- Since 5.0 Community is FSL-1.1-ALv2, not OSI open source; offering it as a competing commercial service is not allowed until each release turns Apache 2.0 after two years
- Rolling back one specific changeset (rollback-one-changeset) is Liquibase Secure only; Community rolls back the most recent changes
- Slim distribution: only the H2 driver is bundled, so we had to add the PostgreSQL JDBC jar ourselves
- Liquibase Secure prices are not published, and each plan requires a professional services package
Best For
Teams that need free rollback, regulated environments that deploy the same changelog to many environments with contexts and labels, multi-database products that want database-neutral changelogs, and shops that review generated SQL before every deploy.
Two models: versioned files versus changesets in a changelog
Flyway's model is a directory of SQL files whose names carry the order: V1__create_customers.sql, V2__add_plan.sql and so on, plus repeatable R__ files that re-run whenever their checksum changes. Flyway sorts by version, applies what is pending and writes one row per script to flyway_schema_history. There is nothing else to learn, and code review means reading the SQL that will run. Liquibase's model is a changelog, a list of changesets each identified by id, author and file. A changelog can be formatted SQL, where comments mark each changeset and its rollback, or XML, YAML or JSON, where changesets use change types such as createTable or addColumn that Liquibase turns into database-specific SQL. That second option is why products that ship to several database engines tend to choose Liquibase. Changesets can also carry contexts and labels, so one changelog serves development, test and production. In our run, a seed changeset tagged context:dev ran with --contexts=dev and was reported as 'Filtered out: 1' with --contexts=prod. Flyway's nearest equivalents are separate locations per environment and named environments in flyway.toml. Both tools also support code: Flyway runs Java migrations and shell or Python scripts, Liquibase has custom Java changes and executeCommand, which 5.0.4 lets you switch off with new lockdown flags.
Rollback is the real dividing line
In Flyway Community there is no rollback. We wrote an undo file (U2__add_plan.sql), and flyway info even marked version 2 as Undoable, but flyway undo stopped with 'ERROR: Upgrade required: undo is not supported by Community' and exit code 35; check -dryrun was refused the same way. Redgate's feature table lists undo migrations, the undo command, dry-run scripts, cherry-picking and deploy rules under Teams and Enterprise, and generated undo scripts under Enterprise only. Flyway's position is that you roll forward: write V5 that reverses V4. Liquibase Community does roll back. After tagging the database at v3, rollback-count --count=1 ran the seed changeset's rollback statement and left the customers table empty, and rollback-count-sql printed the script first. rollback to a tag and rollback-to-date work the same way. Two limits: in formatted SQL you write the rollback statements yourself (we wrote --rollback lines for every changeset), and rolling back one specific changeset out of order is a Secure feature: our rollback-one-changeset call was rejected with 'Unexpected argument(s)' and suggestions for rollback, rollback-count and rollback-sql. If the requirement is 'we must be able to revert the last release in the pipeline without buying anything', Liquibase meets it and Flyway does not.
What we saw on PostgreSQL 16: checksums, previews and killed processes
On 20 November 2026 we ran Flyway 13.13.0 (Redgate CLI, sha1 verified against Redgate's published checksum) and Liquibase 5.0.4 (sha256 matching GitHub's asset digest) on Java 21 against PostgreSQL 16.15, with the same three-step schema in each: create customers, add a plan column with an index, seed 10,000 rows. Flyway applied three migrations in 0.105 seconds of database time, 4.6 seconds of wall time including JVM start-up; Liquibase took 2.4 seconds wall. Both refused an edited migration: Flyway reported 'Migration checksum mismatch for migration version 1' and pointed to repair, Liquibase raised ValidationFailedException with the old and new checksum. Then we added a fourth migration that creates a table and sleeps for 20 seconds, and killed each tool with kill -9 halfway through. With Flyway, PostgreSQL showed an advisory lock while it ran and none afterwards, the half-created table was gone because the transaction rolled back, and the next migrate applied version 4 without any manual step; it took 13.9 s, consistent with the killed session's server-side backend finishing its sleep first. With Liquibase, the transaction also rolled back, but DATABASECHANGELOGLOCK still said locked, and the next update printed 'Waiting for changelog lock....' until our 60-second timeout. liquibase release-locks fixed it and update then took 1.9 s.
Licences, editions and what you pay for
Licensing changed on both sides. The Flyway engine on GitHub is Apache-2.0, but the CLI you download from Redgate is 'Flyway Redgate Edition' under Redgate's subscription EULA; without a licence it runs as Community and prints 'You are not signed in to Flyway'. Redgate's site offers Community free and Enterprise by quote, and its documentation still shows a Teams column; the paid features that matter most to day-to-day work are undo, dry runs, cherry-picking, deploy rules, secrets-manager integration, drift detection and change reports. Liquibase Community moved to the Functional Source License (FSL-1.1-ALv2) with 5.0 on 30 September 2025. You can use it internally and in production, modify it and redistribute it; you cannot offer it as a competing commercial product or service, and each release becomes Apache 2.0 two years after it ships, while 4.x releases stay Apache 2.0. Liquibase itself says FSL is not an OSI open-source licence, and contributors now sign a CLA. Liquibase Secure comes in Starter (for companies under $1 billion revenue), Team, Business and Enterprise plans with no published prices, and each plan requires a professional services package. Neither vendor publishes paid prices, so compare by asking both for quotes against the specific features you need.
Running them in CI and in applications
Both run as a CLI, a Maven or Gradle plugin, or a Java library, so either can run inside the application at start-up. Flyway markets this directly: its Community page says to ship migrations with the application, run them on startup through the API, and notes that a failed migration prevents the app from starting. Packaging differs a lot. Liquibase 5.0.4 is an 8.8 MB tarball that bundles only the H2 driver, so you add your JDBC driver (we dropped in the PostgreSQL 42.7.8 jar). Flyway's Linux bundle is 614 MB with a JRE and 552 MB without, because it ships drivers for every supported database plus Redgate's comparison engine (365 MB) and SQLFluff; the redgate/flyway Docker image is the usual way round that in CI. Releases differ too: Flyway shipped 13.10.3 through 13.13.0 between 15 October and 19 November 2026, while Liquibase Community follows a slower cadence (5.0.2 in March, 5.0.3 in May, 5.0.4 in August 2026) with nightly builds in between. For pipelines, plan for each tool's failure mode. Both exit non-zero on a checksum mismatch (exit code 1 for each in our run), which is the check you want before any deploy. With Liquibase, also add a release-locks step to the runbook for jobs that get cancelled mid-deploy, because a dead process leaves its lock row behind. Related comparisons on TechLogHub: Prisma vs Drizzle, Drizzle vs TypeORM and PostgreSQL vs MySQL.
Verdict
Pick Flyway when your team writes migrations in SQL, wants the smallest possible concept count (numbered files, one history table) and fixes mistakes by shipping another migration rather than rolling back. That covers most application teams, especially JVM services that run migrations on startup. Its PostgreSQL advisory lock also recovered cleanly from a killed process in our run. Budget for a quote if you later want undo, dry-run scripts, drift detection or cherry-picking, because Community has none of them. Pick Liquibase when rollback has to be available without a licence, when one changelog goes to several environments and needs contexts or labels to decide what runs where, when release managers or DBAs want to read update-sql output before every deployment, or when you ship to several database engines and prefer database-neutral changelogs. Check the FSL licence if you build a product or service around it, add your JDBC driver, and put liquibase release-locks in your runbook for interrupted deploys. For a new PostgreSQL or MySQL service with no rollback requirement, start with Flyway; for regulated, multi-environment estates, start with Liquibase.