Skip to content
SPECIFICTION
Get listed

dbdiff vs sqldef

dbdiff

rekurt.github.io

sqldef

github.com

Side by side

Figuredbdiffsqldef
Price from—Free
Free plan—Yes
Free trial——
Open source——
WindowsYesYes
macOSYesYes
LinuxYesYes
Self-hostedYesYes
Plans published01
Spec score · Database Schema Comparison Tools7.7 (#10)7.6 (#12)
LicenseThe project page identifies the license as MIT.The repository says source files are distributed under the MIT License, with the parser under Apache License 2.0.
PurposeDBDiff compares local or remote databases and generates a migration file for their differences.sqldef is a CLI tool for diffing SQL schemas and managing relational database migrations with regular SQL DDLs.

Plans

dbdiff

No plans published.

dbdiff pricing →

sqldef

  • sqldefFree

sqldef pricing →

In their own words

dbdiff

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.

Visit rekurt.github.io

sqldef

sqldef is a free command-line tool for managing relational database migrations with SQL DDLs. Users maintain a SQL file describing the desired schema; sqldef compares it with the current database schema to generate and apply changes. It lists support for MySQL, MariaDB, TiDB, PostgreSQL, SQL Server, and SQLite3. The workflow can export the current schema and use a dry run to preview migrations before execution. It can also compare two SQL files without a database connection, for schema validation, CI/CD, and migration script generation. Repeated runs are safe: when the database matches the desired schema, another run shows no changes. Rename annotations are documented for tables, columns, indexes, and ENUM values. Each database tool is distributed as a single binary without dependencies. Linux, macOS, Windows, and self-hosted availability are listed. Linux binaries and Docker images are available, but Debian packages are not; a Homebrew tap is listed for four database tools. Source files use the MIT License, while the parser uses Apache License 2.0.

Visit github.com