
DBDiff
Summary
DBDiff is an open-source tool for comparing local or remote databases and generating migration files from the differences. Its drivers support MySQL, PostgreSQL, and SQLite. Diffs 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 include or exclude tables, exclude columns, filter rows, 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 migration runner includes commands for creating, applying, rolling back, inspecting, validating, repairing, and baselining migrations. A Supabase option selects the PostgreSQL driver and enables SSL automatically; it reads the public schema and leaves managed auth and storage schemas outside the diff. Pre-built binaries are available for Windows, macOS, and Linux without requiring PHP, Node, or Composer. PHAR and Composer installs require PHP 8.1 or newer. For PostgreSQL 16 test cases, the built-in renderer reproduced 68 of 90 cases, compared with 81 of 90 for pg_dump when available and new enough.
Who it is for
DBDiff may suit developers and database teams comparing schemas or data across MySQL, PostgreSQL, and SQLite. It is also relevant to users integrating generated migrations with tools such as Flyway, Liquibase, or Laravel Migrations.
What is good
- Supports MySQL, PostgreSQL, and SQLite.
- Generates up and down migration SQL.
- Includes a migration runner with validation and repair commands.
- Pre-built binaries do not require PHP, Node, or Composer.
What to know first
- Supabase diffs exclude managed auth and storage schemas.
- PostgreSQL renderer reproduced 68 of 90 test cases.
- PHAR and Composer installs require PHP 8.1 or newer.
Everything Xiaomi review
DBDiff: the full review
DBDiff offers broad schema and data comparisons, migration formats, and a built-in migration runner across three database engines. Review its Supabase scope and PostgreSQL renderer results if those are central to your workflow.
DBDiff is an open-source database comparison and migration tool for teams that need to turn differences between local or remote databases into migration scripts. It suits developers working across MySQL, PostgreSQL or SQLite who want both comparison and migration commands in one CLI. Its broad coverage is appealing, but PostgreSQL renderer limitations and a narrower Supabase scope matter for some deployments.
Overview
DBDiff compares database schemas and data, then generates migration files with up and down SQL. It can emit native SQL, Flyway, Liquibase XML or YAML, Laravel Migrations, and custom-template output, making it useful in projects with established migration conventions as well as those using its own runner.
Its scope extends beyond tables to views, materialized views, triggers, procedures and functions, types, domains, sequences, row-level-security policies, and data. The project reports constant-count round-trips for schema diffing regardless of table count and testing on databases with millions of rows. That is relevant for larger schemas, though it does not guarantee a particular runtime for every workload.
Key features
Comparison and filtering
YAML configuration and CLI options can include or exclude tables, exclude columns, filter rows, and set schema or data scope per table. Those controls help keep generated migrations focused when databases contain objects or records that should not be carried into a particular change.
Migration workflow
The built-in runner supports creating, applying, rolling back, inspecting, validating, repairing, and baselining migrations. Teams can use it for a connected workflow or generate output for compatible tools such as Flyway, Liquibase, and Laravel Migrations. This flexibility is useful when migration practices differ between projects; teams seeking a graphical workflow should consider another option.
PostgreSQL and Supabase
The --supabase option selects the PostgreSQL driver and enables SSL, and Supabase policies and row-level-security flags are treated as diffable objects. However, DBDiff reads only the public schema in Supabase; managed schemas such as auth and storage are excluded. PostgreSQL renderer results also warrant attention: in PostgreSQL 16 test cases, its renderer reproduced 68 of 90 cases, compared with 81 of 90 for pg_dump when that utility was available and new enough. Enum label removal or reordering can also prevent automatic migration of dependent routines, types, partition keys, or certain views.
Pricing
DBDiff is free and open source under the MIT license, with no paid plan described. Pre-built binaries do not require PHP, Node, or Composer; PHAR and Composer installations require PHP 8.1 or newer. Docker and Podman images for linux/amd64 and linux/arm64 are published to GHCR on every release. The project directs users to GitHub issues for support and offers a contact route for commercial support enquiries.
Platforms
Pre-built binaries are available for Windows, macOS, and Linux, with x64 and arm64 variants. The multi-architecture container images provide another deployment route for Linux environments. Database drivers cover MySQL, PostgreSQL, and SQLite; compatible services also include AWS Aurora, RDS, Neon, AlloyDB, CockroachDB, YugabyteDB, TimescaleDB, and pgvector, though most of those variants are not core-team tested.
Who it's for
DBDiff is a strong fit for developers and database teams that want cross-engine comparisons, configurable scope, and migration generation without paying for a license. It is especially relevant when the team values a CLI that can either run migrations itself or hand them to common migration tools. Supabase users should be comfortable limiting comparisons to the public schema, and PostgreSQL-heavy teams should verify that renderer behavior covers their objects and changes.
Pros and cons
- Pro: Broad schema and data coverage across three database engines can reduce the need for separate comparison tools.
- Pro: Multiple migration formats and a built-in runner accommodate both existing workflows and teams wanting CLI-based migration management.
- Pro: Fine-grained table, column, row, and per-table scope controls help tailor comparisons to a release.
- Con: Supabase comparisons exclude managed auth and storage schemas, limiting their usefulness when those objects are in scope.
- Con: The PostgreSQL 16 renderer reproduced fewer test cases than pg_dump in the reported comparison, and some enum changes cannot automatically migrate dependent objects.
- Con: Most listed compatible database variants are not core-team tested, so compatibility should not be assumed for every service.
Alternatives
For a broader directory of options, see Database Schema Comparison Tools.
- dbdiff is another free option with Linux, macOS, Windows, and self-hosted platforms; choose it when you want to compare a separately listed free tool.
- Skeema has a free Community plan with tables, stored procedures and functions, and 18 linter checks on Linux and macOS; choose it if those checks and platform scope suit your needs. Its Plus plan is 124.00 USD per month.
- dbForge Studio for PostgreSQL offers a free Express plan with basic, limited functionality and a paid Standard plan at 89.95 USD per year; choose it if a PostgreSQL-focused option with a free trial is a better fit.
- sqldef is a free, MIT-licensed open-source CLI tool, with its parser under Apache 2.0; consider it when that simpler licensing and CLI profile fits.
- pgquarrel is free, BSD-3-Clause licensed software for Linux, self-hosted environments, and Windows; consider it if those platform and license terms match your requirements.
- Redgate SQL Provision is a paid alternative with capacity tiers based on production data volume and a free trial; choose it if that capacity-tier model fits your provisioning needs.
- SQL Delta is a paid, Windows-only alternative with a free trial; consider it if Windows support and a trial are priorities.
- apgdiff is a free alternative; consider it if you are evaluating another no-cost option.
Verdict
Choose DBDiff if you need a free, cross-platform CLI to compare MySQL, PostgreSQL, or SQLite schemas and data, generate migrations in several formats, and optionally manage them with a built-in runner. Its range of scope controls and integrations are its strongest reasons to choose it. Look elsewhere if your Supabase work must include managed schemas or if your PostgreSQL changes depend on renderer cases DBDiff does not reproduce reliably.
Compared on database schema comparison tools
- Migration scripts
- Yesdbdiff.dev
- Database scope
- multi-enginedbdiff.dev
- CI/CD integration
- Yesdbdiff.dev
- Supported platforms
- cross-platformdbdiff.dev
Facts
- Purpose
- DBDiff compares two local or remote databases and automatically produces a migration file containing their differences.dbdiff.dev · 1 Oct 2026
- Database support
- DBDiff supports MySQL, PostgreSQL and SQLite through its database drivers.dbdiff.dev · 1 Oct 2026
- 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.dbdiff.dev · 1 Oct 2026
- Migration runner
- The built-in migration runner provides new, up, down, status, validate, repair and baseline commands.dbdiff.dev · 1 Oct 2026
- Migration integrations
- DBDiff supports Flyway, Liquibase, Laravel Migrations and other compatible migration tools.dbdiff.dev · 1 Oct 2026
- Supabase
- The --supabase option selects the PostgreSQL driver and enables SSL automatically, while Supabase policies and row-level-security flags are diffed as first-class objects.dbdiff.dev · 1 Oct 2026
- Supabase scope
- For Supabase, DBDiff reads the public schema and excludes objects in managed auth and storage schemas from the diff.dbdiff.dev · 1 Oct 2026
- 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.dbdiff.dev · 1 Oct 2026
- Installation
- Pre-built binaries require no PHP, Node or Composer, while PHAR and Composer installations require PHP 8.1 or newer.dbdiff.dev · 1 Oct 2026
- Containers
- Multi-architecture Docker and Podman images for linux/amd64 and linux/arm64 are published to GHCR on every release.dbdiff.dev · 1 Oct 2026
- Performance
- Schema diffing uses a constant number of round-trips regardless of table count and has been tested on databases with millions of rows.dbdiff.dev · 1 Oct 2026
- Filtering
- YAML configuration and CLI options support table inclusion and exclusion, column exclusions, row filters and per-table schema or data scope.dbdiff.dev · 1 Oct 2026
- Security support
- The security policy lists version 2.0.x as supported, version 1.0.x as unsupported, and requests vulnerability reports by email rather than public issues.github.com · 1 Oct 2026
- License
- The DBDiff repository is released under the MIT license.github.com · 1 Oct 2026
- Support
- The project directs users to open or check GitHub issues and provides a contact route for commercial support enquiries.dbdiff.dev · 1 Oct 2026
- Diff coverage
- It can diff tables, views, materialized views, triggers, routines, types, domains, sequences, row-level security policies, and data.dbdiff.dev · 2 Oct 2026
- Migration output
- It generates up and down SQL and supports native SQL, Flyway, Liquibase XML/YAML, Laravel Migrations, and custom templates.dbdiff.dev · 2 Oct 2026
- Built-in runner
- The CLI includes commands to create, apply, roll back, inspect, validate, repair, and baseline migrations.dbdiff.dev · 2 Oct 2026
- Integrations
- The site documents Supabase support and compatibility with tools including Flyway, Liquibase, Laravel Migrations, Docker, and Podman.dbdiff.dev · 2 Oct 2026
- 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.dbdiff.dev · 2 Oct 2026
- Operating systems
- Pre-built binaries are listed for Windows, macOS, and Linux, with x64 and arm64 variants.dbdiff.dev · 2 Oct 2026
- Limitations
- For Supabase, DBDiff reads the public schema; objects in managed schemas such as auth and storage are outside the diff.dbdiff.dev · 2 Oct 2026
- PostgreSQL limitation
- The site documents cases where enum label removal or reordering cannot automatically migrate dependent routines, types, partition keys, or certain views.dbdiff.dev · 2 Oct 2026
- Maker
- Akal Software lists DBDiff as an open-source project and describes itself as a London-based technology consultancy.akalsoftware.com · 2 Oct 2026
Best DBDiff alternatives
See all 12Where it ranks on Everything Xiaomi
Is DBDiff yours?
Claim it for free: prove the domain, then correct facts, plans and screenshots. An editor reviews every change.
Sources
- dbdiff.dev· checked 1 Oct 2026
- github.com/DBDiff/DBDiff/blob/master/SECURITY.md· checked 1 Oct 2026
- github.com/DBDiff/DBDiff· checked 1 Oct 2026
- akalsoftware.com· checked 2 Oct 2026

