Skip to content
SPECIFICTION
Get listed

db-migrate vs golang-migrate

db-migrate

github.com

golang-migrate

github.com

Side by side

Figuredb-migrategolang-migrate
Price fromFreeFree
Free planYesYes
Free trial——
Open source——
Windows—Yes
macOS—Yes
LinuxYesYes
Self-hostedYesYes
Plans published11
Spec score · Database Migration Tools8.5 (#5)7.8 (#15)
LicenseThe project is distributed under the MIT License.The project is distributed under the MIT License, which requires retaining the copyright and permission notices.
Purposedb-migrate describes itself as a database migration framework for Node.js.golang-migrate reads database migrations from sources and applies them to a database in order.

Plans

db-migrate

  • db-migrateFree

db-migrate pricing →

golang-migrate

  • Open sourceFree

golang-migrate pricing →

In their own words

db-migrate

db-migrate is a free, open-source database migration framework for Node.js applications. It runs on Linux and can be self-hosted. The command-line interface provides up, down, reset, create, and db commands for applying, rolling back, resetting, creating, and managing migrations. Supported databases listed by the project include MySQL, PostgreSQL, sqlite3, MongoDB, and CockroachDB, with database drivers installed separately. Migration files support callback-based or promise-based interfaces, while the --sql-file option creates separate SQL files for migration-up and migration-down statements. Applied migrations are recorded in a migrations table. Environment settings can come from database.json, with command-line choices for the environment and configuration file. Database usernames and passwords can reference environment variables. Global and local npm installation are documented. Node.js 24 and newer are officially supported; package metadata specifies version 8.0.0 or later. Rollback is supported, and the format is mixed.

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