FREEDOM251

Freedom251 › Database Schema Comparison Tools

dbdiff

Free plan LinuxMacSelf-hostedWindows

Visit dbdiff Alternatives

dbdiff's own site

What dbdiff is

DBDiff compares local or remote MySQL, PostgreSQL, and SQLite databases and generates migration files from schema or data differences. Generated migrations can include both 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. Migration output options include native SQL, Flyway, Liquibase, Laravel Migrations, and custom templates. A configuration file can specify connections, drivers, comparison scope, included or ignored tables and fields, and row filters. Installation options include pre-built binaries for Windows, macOS, and Linux, as well as npm packages, a PHAR, Docker or Podman images, and Composer source installation. For PostgreSQL, DBDiff can compare row-level security policies and table security flags. By default, generation stops if 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 automatic migration from applying. DBDiff is free and released under the MIT license.

Who it suits

DBDiff may suit developers and database teams who need to compare MySQL, PostgreSQL, or SQLite databases and produce migrations. Its runner and multiple output formats support different migration workflows.

What it does well

  • Free and released under the MIT license.
  • Compares schema and data across three database engines.
  • Generates migrations with up and down changes.
  • Supports Flyway, Liquibase, Laravel, and custom templates.
  • Pre-built binaries are listed for Windows, macOS, and Linux.

What to know first

  • PostgreSQL enum changes can leave dependent objects blocking migrations.
  • Other database versions may not be actively tested.
  • Drop-table and drop-column migrations stop by default.

Limits

By default, generation stops for migrations that drop a table or column, though an option allows those changes. With Supabase, dbdiff reads the public schema; managed auth and storage schemas are outside the comparison.

Getting started

  1. Visit the dbdiff project website.
  2. Choose an installation route: pre-built binary, npm, PHAR, Docker or Podman, or Composer source.
  3. Set database connections and comparison options in dbdiff.yml if needed.
  4. Run a comparison and generate a migration in a supported format.
  5. Use the migration runner to apply, check, or manage migrations.

Overview

DBDiff is an open-source command-line tool for comparing local or remote MySQL, PostgreSQL, and SQLite databases and producing reversible SQL migrations. It suits developers and database teams that want comparison and migration management across more than one engine without a paid plan. Its breadth is useful, but engine-specific limitations and the need to review destructive changes make it a poor fit for unattended migration generation.

DBDiff is released under the MIT license. For a wider selection, see our Database Schema Comparison Tools list.

Key features

Compare schemas and data

DBDiff can compare schema objects and data, including tables, views, triggers, routines, types, sequences, and row-level security policies. A dbdiff.yml file can define connections and drivers, set comparison scope, include or ignore tables and fields, and apply row filters. That flexibility is valuable for targeted comparisons, though it also puts responsibility on the operator to configure the scope correctly.

Generate and manage migrations

Generated changes can include both up and down migrations, with output for native SQL, Flyway, Liquibase XML or YAML, Laravel Migrations, and custom templates. Commands cover creating, applying, rolling back, checking, validating, repairing, and baselining migrations, making DBDiff more than a one-off comparison utility.

Generation stops by default when a change would drop a table or column, a sensible safeguard for teams reviewing migrations before deployment. An option allows those changes, but enabling it makes careful review essential. PostgreSQL enum label removals or reordering can also produce migrations that fail when dependent objects block the change.

Engine coverage and performance

Core support covers MySQL 8.0.x, 8.4.x, and 9.3.x/9.6.x; PostgreSQL 14.x–16.x; and SQLite 3.x. Compatible variants include MariaDB, Aurora, PlanetScale, Neon, CockroachDB, YugabyteDB, TimescaleDB, and pgvector, although most are not actively tested by the core team. For Supabase, the PostgreSQL driver uses SSL and reads the public schema, not managed schemas such as auth or storage.

The project says it has been tested with databases containing millions of rows and that schema comparisons use a constant number of round-trips regardless of table count. PostgreSQL comparisons also include row-level security policies and each table's ENABLE and FORCE settings.

Pricing

DBDiff is free and open source, with no paid plan or seat-based tier. Its MIT license permits use without a subscription, while commercial support enquiries are invited separately.

Platforms

DBDiff supports Linux, macOS, Windows, and self-hosted deployment. Pre-built binaries are offered for Windows, macOS, and Linux; other installation routes include npm, PHAR, Docker or Podman images, and Composer source installation. Multi-architecture Docker and Podman images are published to GHCR with each release.

Who it's for

DBDiff is a strong match for developers and teams working across MySQL, PostgreSQL, or SQLite who need schema and data diffs alongside migration generation and lifecycle commands. It is less suitable when teams need dependable automated handling of PostgreSQL enum changes, or when they rely on Supabase-managed schemas outside public.

Pros and cons

  • Pros: One free, MIT-licensed tool handles schema and data comparisons across three database engines.
  • Pros: Multiple migration output formats and commands for applying, rolling back, validating, and repairing changes support a fuller deployment workflow.
  • Pros: Default blocks on table and column drops reduce the chance of generating destructive migrations without review.
  • Cons: PostgreSQL enum label removal or reordering may fail when dependent objects prevent the generated migration from applying.
  • Cons: Supabase comparisons exclude managed schemas such as auth and storage.
  • Cons: Many compatible database variants are not actively tested by the core team, so teams on those systems should validate behavior before relying on it.

Alternatives

  • DBDiff is another free, open-source DBDiff listing, described by Akal Software, a London-based technology consultancy.
  • dbForge Studio for PostgreSQL is worth considering for a PostgreSQL-focused alternative with a free Express tier and a paid Standard plan.
  • Skeema offers a free Community tier covering tables, stored procedures and functions, plus 18 linter checks; choose it if that scope and Linux or macOS support fit your needs.
  • sqldef is a free MIT-licensed CLI option for those seeking an open-source alternative.
  • pgquarrel is a free BSD-3-Clause option for readers considering another database comparison tool.
  • apgdiff is another free alternative.
  • driftcurve is a free web-based alternative.
  • UserFolderMigrator is a free Windows alternative.

Verdict

Choose DBDiff if you need a free, cross-platform tool that combines multi-engine schema and data comparison with migration generation and management. Its format support and protective default around drops are persuasive strengths; look elsewhere if your workflow depends on Supabase-managed schemas or automatic PostgreSQL enum changes that must apply without manual intervention.

Verdict

DBDiff combines database comparison, migration generation, and migration management for three named database engines. Review its documented PostgreSQL enum limitation and default safeguards around destructive changes before relying on generated migrations.

Questions

Does dbdiff cost anything?

The project is free and open source under the MIT license.

Which databases can it compare?

It supports MySQL, PostgreSQL, and SQLite, including local or remote databases. The site lists tested version ranges and says other versions may work but are not actively tested.

What migration formats does it support?

Formats include native SQL, Flyway, Liquibase XML and YAML, Laravel Migrations, and custom templates.

Which operating systems are supported?

Pre-built binaries are listed for Windows, macOS, and Linux. Docker and Podman images are also available.

Does it work with Supabase?

The --supabase option selects the PostgreSQL driver and enables SSL. It reads the public schema; Supabase-managed auth and storage schemas are outside the diff.

What is the license?

dbdiff is released under the MIT license.

Facts from dbdiff's own pages

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. · dbdiff.dev, 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. · dbdiff.dev, 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. · dbdiff.dev, 2 Oct 2026
Database objects
Its listed diff targets include tables, views, triggers, routines, types, sequences, row-level security policies, and data. · dbdiff.dev, 2 Oct 2026
Database support
It supports MySQL, PostgreSQL and SQLite; other versions may work but are not actively tested. · dbdiff.dev, 3 Oct 2026
Deployment
Multi-architecture Docker and Podman images are published to GHCR on each release. · dbdiff.dev, 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. · dbdiff.dev, 3 Oct 2026
Distribution
The site offers pre-built binaries, npm packages, a PHAR, Docker/Podman images, and Composer source installation. · dbdiff.dev, 2 Oct 2026
Install options
The site lists prebuilt binaries, npm, PHAR, Docker or Podman, and Composer source installation. · dbdiff.dev, 3 Oct 2026
License
The project page identifies the license as MIT. · dbdiff.dev, 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. · dbdiff.dev, 2 Oct 2026
Migration formats
It supports native SQL, Flyway, Liquibase XML and YAML, Laravel, and custom templates. · dbdiff.dev, 3 Oct 2026
Migration integrations
It supports output formats for Flyway, Liquibase, and Laravel Migrations, as well as native SQL and templates. · dbdiff.dev, 2 Oct 2026
Migration runner
Built-in commands apply, roll back, check, validate, repair and baseline migrations. · dbdiff.dev, 3 Oct 2026
Operating systems
Prebuilt binaries are listed for Windows, macOS and Linux. · dbdiff.dev, 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. · dbdiff.dev, 3 Oct 2026
Platforms
Pre-built binaries are listed for Windows x64/arm64, macOS Intel/Apple Silicon, and Linux x64/arm64 using glibc or musl. · dbdiff.dev, 2 Oct 2026
Purpose
DBDiff compares local or remote databases and generates a migration file for their differences. · dbdiff.dev, 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. · dbdiff.dev, 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. · dbdiff.dev, 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. · dbdiff.dev, 3 Oct 2026
Support
The project directs users to GitHub issues and offers a contact route for commercial support enquiries. · dbdiff.dev, 3 Oct 2026

Where dbdiff stands on Freedom251

Look at these too