dbdiff
DBDiff compares local or remote MySQL, PostgreSQL, and SQLite databases, then generates migration files from schema or data differences.
What dbdiff is
DBDiff compares local or remote MySQL, PostgreSQL, and SQLite databases, then generates migration files from schema or data differences. Generated migrations can include up and down changes. Its runner provides commands to create, apply, roll back, check, validate, repair, and baseline migrations. Comparison targets include tables, views, triggers, routines, types, sequences, row-level security policies, and data. Output formats include native SQL, Flyway, Liquibase, Laravel Migrations, and custom templates. A configuration file can set connections, drivers, comparison scope, included or ignored tables and fields, and row filters. Install options include pre-built Windows, macOS, and Linux binaries, npm packages, a PHAR, Docker or Podman images, and Composer source installation. For PostgreSQL, it can compare row-level security policies and table security flags. By default, generation stops when a migration would drop a table or column; an option allows those changes. DBDiff is free and open source under the MIT license.
Good
- Compares both schemas and data.
- Generates migrations with up and down changes.
- Supports Flyway, Liquibase, Laravel, and custom templates.
- Includes commands to apply and roll back migrations.
- Free and released under the MIT license.
Watch out
- PostgreSQL enum removals or reordering can block generated migrations.
- Other compatible database variants may not be actively tested.
- Table and column drops stop generation by default.
Who it suits
DBDiff suits developers who need to compare MySQL, PostgreSQL, or SQLite databases and generate or manage migrations across environments. Its multiple output formats and command-line runner may fit teams incorporating migration tasks into CI/CD workflows.
Verdict
DBDiff covers database comparison and migration workflows across three core database engines, with several output formats and install choices. Review its PostgreSQL enum limitation and default behavior for destructive changes before relying on generated migrations.
The facts
Each one read from dbdiff's own pages, with the date it was checked.
What it does
- Additional compatible databases
- The site says compatible variants include MariaDB, Aurora, PlanetScale, Neon, CockroachDB, YugabyteDB, TimescaleDB, and pgvector, with most not tested by the core team unless noted.checked 2 Oct 2026
- Configuration
- A dbdiff.yml configuration file can set database connections, drivers, diff scope, included or ignored tables and fields, and row filters.checked 2 Oct 2026
- Database compatibility
- The site lists support for MySQL 8.0.x, 8.4.x, and 9.3.x/9.6.x, PostgreSQL 14.x–16.x, and SQLite 3.x.checked 2 Oct 2026
- Database objects
- Its listed diff targets include tables, views, triggers, routines, types, sequences, row-level security policies, and data.checked 2 Oct 2026
- Database support
- It supports MySQL, PostgreSQL and SQLite; other versions may work but are not actively tested.checked 3 Oct 2026
- Deployment
- Multi-architecture Docker and Podman images are published to GHCR on each release.checked 3 Oct 2026
- Destructive changes
- By default, generation stops for migrations that drop a table or column; the page documents an option to allow those changes.checked 3 Oct 2026
- Distribution
- The site offers pre-built binaries, npm packages, a PHAR, Docker/Podman images, and Composer source installation.checked 2 Oct 2026
- Install options
- The site lists prebuilt binaries, npm, PHAR, Docker or Podman, and Composer source installation.checked 3 Oct 2026
- License
- The project page identifies the license as MIT.checked 3 Oct 2026
- Limitations
- The site documents PostgreSQL enum label removals or reordering as a case where dependent objects may prevent an automatically generated migration from applying.checked 2 Oct 2026
- Migration formats
- It supports native SQL, Flyway, Liquibase XML and YAML, Laravel, and custom templates.checked 3 Oct 2026
- Migration integrations
- It supports output formats for Flyway, Liquibase, and Laravel Migrations, as well as native SQL and templates.checked 2 Oct 2026
- Migration runner
- Built-in commands apply, roll back, check, validate, repair and baseline migrations.checked 3 Oct 2026
- Operating systems
- Prebuilt binaries are listed for Windows, macOS and Linux.checked 3 Oct 2026
- Performance
- The site says it has been tested on databases with millions of rows and that schema diffs use a constant number of round-trips regardless of table count.checked 3 Oct 2026
- Purpose
- DBDiff compares local or remote databases and generates a migration file for their differences.checked 3 Oct 2026
- Schema and data diffs
- It can diff database objects including tables, views, triggers, routines, types, sequences, row level security policies and data.checked 3 Oct 2026
- Security feature
- For PostgreSQL, the tool diffs row level security policies and each table’s ENABLE and FORCE ROW LEVEL SECURITY flags.checked 3 Oct 2026
- Supabase
- The Supabase option selects the PostgreSQL driver and enables SSL; DBDiff reads the public schema, while Supabase-managed schemas are outside the diff.checked 3 Oct 2026
- Support
- The project directs users to GitHub issues and offers a contact route for commercial support enquiries.checked 3 Oct 2026
Where it runs
- Platforms
- Pre-built binaries are listed for Windows x64/arm64, macOS Intel/Apple Silicon, and Linux x64/arm64 using glibc or musl.checked 2 Oct 2026
Alternatives to dbdiff
- 1
dbForge Studio for PostgreSQL
Free planLinuxmacOSWindows7.5From $89.95 a year - 2

GitHub CodeQL
Free planWebExtensionLinuxmacOS7.5From $30 a month - 3
driftcurve
Free planOpen sourceWebAPISelf-hosted7.1Free plan - 4

Skeema
Free planLinuxmacOSWindows6.9From $649 a year - 5
SQL Delta
Windows6.8$185 one-time - 6

Altova DiffDog
Windows6.3$189 one-time
