Skip to content
SPECIFICTION
Get listed

dbmate vs golang-migrate

dbmate

github.com

golang-migrate

github.com

Side by side

Figuredbmategolang-migrate
Price fromFreeFree
Free planYesYes
Free trial——
Open source——
WindowsYesYes
macOSYesYes
LinuxYesYes
Self-hostedYesYes
Plans published11
Spec score · Database Migration Tools8.6 (#3)7.8 (#15)
Database supportThe README lists MySQL, MariaDB, PostgreSQL, SQLite, and ClickHouse as supported databases.Listed database drivers include PostgreSQL, MySQL/MariaDB, SQLite, MongoDB, Neo4j, CockroachDB, and Google Cloud Spanner.
LicenseThe repository includes an MIT license.The project is distributed under the MIT License, which requires retaining the copyright and permission notices.
PurposeDbmate is a database migration tool that keeps database schemas in sync across developers and production servers.golang-migrate reads database migrations from sources and applies them to a database in order.

Plans

dbmate

  • dbmateFree

dbmate pricing →

golang-migrate

  • Open sourceFree

golang-migrate pricing →

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.

Visit github.com

golang-migrate

golang-migrate reads database migrations from a source and applies them to a database in sequence. Each logical migration has an up file and a down file, and the tool can run as a command-line program or be imported as a Go library. Listed database drivers include PostgreSQL, MySQL/MariaDB, SQLite, MongoDB, Neo4j, CockroachDB, and Google Cloud Spanner. Migration sources include local files, embedded Go data, GitHub, GitLab, Bitbucket, AWS S3, and Google Cloud Storage. The CLI handles Ctrl+C gracefully and does not use config search paths, config files, or automatic environment-variable injection. The library uses io.Reader streams for low memory overhead, is described as thread-safe without goroutine leaks, and supports controlled stopping through a GracefulStop channel to help prevent database corruption. The project documents running the CLI in Docker with a mounted migration directory. golang-migrate is open source under the MIT License and costs nothing. The security policy marks master and 4.x as supported; 3.x and earlier are unsupported.

Visit github.com