dbmate vs sqldef
dbmate
github.comsqldef
sqldef.github.ioSide by side
| Figure | dbmate | sqldef |
|---|---|---|
| Price from | Free | — |
| Free plan | Yes | — |
| Free trial | — | — |
| Open source | — | — |
| Web | — | Yes |
| Windows | Yes | Yes |
| macOS | Yes | Yes |
| Linux | Yes | Yes |
| Self-hosted | Yes | Yes |
| Plans published | 1 | 0 |
| Spec score · Database Migration Tools | 8.6 (#3) | 7.2 (#26) |
| Distribution | The README documents installation through NPM, Homebrew, Scoop, a Linux binary, and Docker images published to GitHub Container Registry. | The project provides pre-built single-binary executables and Docker images. |
| License | The repository includes an MIT license. | The sqldef source files are distributed under the MIT License, while the parser is distributed under Apache License 2.0. |
| Purpose | Dbmate is a database migration tool that keeps database schemas in sync across developers and production servers. | sqldef is a CLI tool for diffing SQL schemas and managing RDBMS migrations with regular SQL DDLs. |
| Support | The repository README links to a discussion of alternatives and a contribution guide, but the opened page does not specify a support service or response time. | The project invites feature requests through pull requests or GitHub Discussions. |
Plans
In their own words
dbmate
dbmate is a free, open-source command-line tool for keeping database schemas in sync across developers and production servers. It works independently of application language and can be used with Go, Node.js, Python, Ruby, PHP, Rust, C++, and other languages or frameworks. Migrations are plain SQL in timestamp-versioned files. Commands create, apply, and roll back migrations, check status, dump or load a schema, and wait for a database server. The project lists MySQL, MariaDB, PostgreSQL, SQLite, and ClickHouse, and documents BigQuery connections and Spanner support for databases using the PostgreSQL dialect. Migrations run atomically in a transaction by default when the database supports transactions, though individual migration blocks can opt out. dbmate can maintain a schema.sql dump for source-control review and Git diffs; creating dumps relies on database client tools such as pg_dump, mysqldump, or sqlite3. It reads DATABASE_URL by default and can load environment variables from a .env file. Installation options include NPM, Homebrew, Scoop, a Linux binary, and Docker images. Go applications can use it as a library, and Go embed can package migrations into an application binary.