dbdiff
rekurt.github.io
What it is
DBDiff is a free, MIT-licensed tool for comparing local or remote MySQL, PostgreSQL, and SQLite databases and generating migrations from schema or data differences. It can produce SQL migrations with up and down changes, using native SQL, Flyway, Liquibase, Laravel, or custom templates. The migration runner can create, apply, roll back, check, validate, repair, and baseline migrations. Listed comparison targets include tables, views, triggers, routines, types, sequences, row-level security policies, and data. Its configuration file can specify connections, drivers, diff scope, included or ignored tables and fields, and row filters. Installation options include pre-built Windows, macOS, and Linux binaries, npm, PHAR, Docker or Podman images, and Composer source. For PostgreSQL, DBDiff also compares row-level security policies and table security flags. By default, generation stops when a migration would drop a table or column, though an option permits those changes. One documented PostgreSQL limitation is that removing or reordering enum labels may leave dependent objects that prevent an automatically generated migration from applying.
Spec sheet
- Purpose
- DBDiff compares local or remote databases and generates a migration file for their differences.Read 3 Oct 2026 · dbdiff.dev
- Platforms
- Pre-built binaries are listed for Windows x64/arm64, macOS Intel/Apple Silicon, and Linux x64/arm64 using glibc or musl.Read 2 Oct 2026 · dbdiff.dev
- Deployment
- Multi-architecture Docker and Podman images are published to GHCR on each release.Read 3 Oct 2026 · dbdiff.dev
- Support
- The project directs users to GitHub issues and offers a contact route for commercial support enquiries.Read 3 Oct 2026 · dbdiff.dev
- License
- The project page identifies the license as MIT.Read 3 Oct 2026 · dbdiff.dev
- 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.Read 2 Oct 2026 · dbdiff.dev
- Configuration
- A dbdiff.yml configuration file can set database connections, drivers, diff scope, included or ignored tables and fields, and row filters.Read 2 Oct 2026 · dbdiff.dev
- 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.Read 2 Oct 2026 · dbdiff.dev
- Database objects
- Its listed diff targets include tables, views, triggers, routines, types, sequences, row-level security policies, and data.Read 2 Oct 2026 · dbdiff.dev
- Database support
- It supports MySQL, PostgreSQL and SQLite; other versions may work but are not actively tested.Read 3 Oct 2026 · dbdiff.dev
- Destructive changes
- By default, generation stops for migrations that drop a table or column; the page documents an option to allow those changes.Read 3 Oct 2026 · dbdiff.dev
- Distribution
- The site offers pre-built binaries, npm packages, a PHAR, Docker/Podman images, and Composer source installation.Read 2 Oct 2026 · dbdiff.dev
- Install options
- The site lists prebuilt binaries, npm, PHAR, Docker or Podman, and Composer source installation.Read 3 Oct 2026 · dbdiff.dev
- Limitations
- The site documents PostgreSQL enum label removals or reordering as a case where dependent objects may prevent an automatically generated migration from applying.Read 2 Oct 2026 · dbdiff.dev
- Migration formats
- It supports native SQL, Flyway, Liquibase XML and YAML, Laravel, and custom templates.Read 3 Oct 2026 · dbdiff.dev
- Migration integrations
- It supports output formats for Flyway, Liquibase, and Laravel Migrations, as well as native SQL and templates.Read 2 Oct 2026 · dbdiff.dev
- Migration runner
- Built-in commands apply, roll back, check, validate, repair and baseline migrations.Read 3 Oct 2026 · dbdiff.dev
- Operating systems
- Prebuilt binaries are listed for Windows, macOS and Linux.Read 3 Oct 2026 · dbdiff.dev
- 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.Read 3 Oct 2026 · dbdiff.dev
- Schema and data diffs
- It can diff database objects including tables, views, triggers, routines, types, sequences, row level security policies and data.Read 3 Oct 2026 · dbdiff.dev
- Security feature
- For PostgreSQL, the tool diffs row level security policies and each table’s ENABLE and FORCE ROW LEVEL SECURITY flags.Read 3 Oct 2026 · dbdiff.dev
- Supabase
- The Supabase option selects the PostgreSQL driver and enables SSL; DBDiff reads the public schema, while Supabase-managed schemas are outside the diff.Read 3 Oct 2026 · dbdiff.dev
Strong points and limits
Strong points
- Compares MySQL, PostgreSQL, and SQLite.
- Generates migrations with up and down changes.
- Supports Flyway, Liquibase, Laravel, and custom templates.
- Pre-built binaries are listed for Windows, macOS, and Linux.
Limits
- Other database versions are not actively tested.
- PostgreSQL enum changes can produce migrations that fail to apply.
- Destructive table or column changes are blocked by default.
Who it suits
DBDiff may suit teams that need to compare supported databases and generate migrations in several formats. It also offers a migration runner and configuration for scoping comparisons.
Verdict
DBDiff combines database comparison, migration generation, and migration management in a free, open-source package. Review its database compatibility and documented PostgreSQL limitations before relying on generated changes.
Where Specifiction places it
- Database Schema Comparison Tools#10 of 257.7