DBDiff
dbdiff.dev
- Free plan
- Windows
- macOS
- Linux
What DBDiff is
DBDiff is an open-source database comparison tool for Linux, macOS, and Windows. It compares two local or remote databases and generates a migration file from their differences. Its drivers support MySQL, PostgreSQL, and SQLite. The diff can cover tables, views, materialized views, triggers, stored procedures and functions, types, domains, sequences, row-level-security policies, and data. YAML configuration and CLI options let users filter tables and columns, apply row filters, and set schema or data scope per table. DBDiff can generate up and down SQL in native SQL, Flyway, Liquibase XML or YAML, Laravel Migrations, and custom templates. Its built-in runner includes commands to create, apply, roll back, inspect, validate, repair, and baseline migrations. The Supabase option selects PostgreSQL and enables SSL; it reads the public schema and leaves managed auth and storage schemas out of the diff. Pre-built binaries do not require PHP, Node, or Composer, while PHAR and Composer installations require PHP 8.1 or newer. For PostgreSQL 16 test cases, the built-in renderer reproduced 68 of 90 cases; pg_dump reproduced 81 of 90 when available and new enough.
Who it suits
DBDiff suits developers and database teams that compare supported database engines and generate migration scripts. It also offers a built-in runner and compatibility with migration tools such as Flyway and Liquibase.
Good to know, and what to watch
- Supports MySQL, PostgreSQL, and SQLite.
- Generates up and down migration SQL.
- Includes a built-in migration runner.
- Pre-built binaries need no PHP, Node, or Composer.
- MIT licensed and open source.
- Supabase diffs exclude managed auth and storage schemas.
- PostgreSQL 16 renderer reproduced 68 of 90 test cases.
- PHAR and Composer installs require PHP 8.1 or newer.
- Some PostgreSQL changes cannot automatically migrate dependent objects.
The verdict
DBDiff covers a broad range of schema and data objects and can produce migrations in several formats. Review the PostgreSQL renderer results and Supabase schema scope if those are central to your use case.
What the maker publishes
- Built-in runner
- The CLI includes commands to create, apply, roll back, inspect, validate, repair, and baseline migrations. source
- Containers
- Multi-architecture Docker and Podman images for linux/amd64 and linux/arm64 are published to GHCR on every release. source
- Database support
- DBDiff supports MySQL, PostgreSQL and SQLite through its database drivers. source
- Database support
- It supports MySQL, PostgreSQL, and SQLite through its CLI drivers. source
- Database variants
- The site lists compatible services including AWS Aurora, RDS, Neon, AlloyDB, CockroachDB, YugabyteDB, TimescaleDB, and pgvector, while noting that most are not core-team tested. source
- Diff coverage
- It can diff tables, views, materialized views, triggers, routines, types, domains, sequences, row-level security policies, and data. source
- Filtering
- YAML configuration and CLI options support table inclusion and exclusion, column exclusions, row filters and per-table schema or data scope. source
- Installation
- Pre-built binaries require no PHP, Node or Composer, while PHAR and Composer installations require PHP 8.1 or newer. source
- Installation
- DBDiff is distributed as pre-built binaries, a PHAR, an npm package, Docker/Podman images, and Composer source. source
- Integrations
- The site documents Supabase support and compatibility with tools including Flyway, Liquibase, Laravel Migrations, Docker, and Podman. source
- License
- The DBDiff repository is released under the MIT license. source
- License
- DBDiff is distributed under the MIT license. source
- Limitations
- For Supabase, DBDiff reads the public schema; objects in managed schemas such as auth and storage are outside the diff. source
- Maker
- Akal Software lists DBDiff as an open-source project and describes itself as a London-based technology consultancy. source
- Migration integrations
- DBDiff supports Flyway, Liquibase, Laravel Migrations and other compatible migration tools. source
- Migration output
- It generates up and down SQL and supports native SQL, Flyway, Liquibase XML/YAML, Laravel Migrations, and custom templates. source
- Migration runner
- The built-in migration runner provides new, up, down, status, validate, repair and baseline commands. source
- Operating systems
- Pre-built binaries are listed for Windows, macOS, and Linux, with x64 and arm64 variants. source
- Performance
- Schema diffing uses a constant number of round-trips regardless of table count and has been tested on databases with millions of rows. source
- PostgreSQL limitation
- The site documents cases where enum label removal or reordering cannot automatically migrate dependent routines, types, partition keys, or certain views. source
- PostgreSQL renderer
- On PostgreSQL 16 test cases, the built-in renderer reproduced 68 of 90 cases and pg_dump reproduced 81 of 90 when available and new enough. source
- Purpose
- DBDiff compares two local or remote databases and automatically produces a migration file containing their differences. source
- Purpose
- DBDiff compares two local or remote databases and generates migration files from their schema and data differences. source
- Schema coverage
- It diffs tables, views, materialized views, triggers, stored procedures and functions, enum types, composite types, domains, sequences, row-level-security policies and data. source
Checked against the maker's pages on 2 Oct 2026.