golang-migrate
golang-migrate is an open-source tool for applying database migrations in order.
What golang-migrate is
golang-migrate is an open-source tool for applying database migrations in order. It reads migrations from a source and applies them to a database; each logical migration has an up file and a down file. You can use it as a command-line tool or import it as a Go library. Listed database drivers include PostgreSQL, MySQL/MariaDB, SQLite, MongoDB, Neo4j, CockroachDB and Google Cloud Spanner. Sources include local files, embedded Go data, GitHub, GitLab, Bitbucket, AWS S3 and Google Cloud Storage. The CLI handles Ctrl+C gracefully and has no configuration search paths, config files or automatic environment-variable injection. The library uses io.Reader streams for low memory overhead and is described as thread-safe without goroutine leaks. Its GracefulStop channel supports controlled stopping to help prevent database corruption. The project documents running the CLI in Docker with a mounted migration directory. The v3 and v4 library APIs are described as stable and frozen; the security policy supports master and 4.x, while 3.x and earlier are unsupported. The project is distributed under the MIT License.
Good
- Free and open source under the MIT License
- Usable as a CLI or Go library
- Supports a broad range of listed database drivers
- Reads migrations from local, cloud and code-hosting sources
- Includes controlled stopping through a GracefulStop channel
Watch out
- Security policy marks 3.x and earlier unsupported
- v3 and v4 library APIs are described as frozen
Who it suits
golang-migrate suits developers who need to apply and roll back database changes from a command line or Go application. Its many listed database drivers and migration sources can fit projects using different storage setups.
Verdict
golang-migrate provides a focused way to manage ordered database changes across a range of databases and migration sources. Check the supported-version policy before choosing a release, particularly if considering 3.x or earlier.
Plans and prices
From golang-migrate's own pricing page, checked 4 Oct 2026.
| Plan | Price | What it gives you |
|---|---|---|
| Open source | Free | No paid plans or usage limits stated on the project pages opened |
The facts
Each one read from golang-migrate's own pages, with the date it was checked.
What it does
- CLI behavior
- The CLI handles Ctrl+C gracefully and has no config search paths, config files, or automatic environment-variable injections.checked 4 Oct 2026
- Database support
- Listed database drivers include PostgreSQL, MySQL/MariaDB, SQLite, MongoDB, Neo4j, CockroachDB, and Google Cloud Spanner.checked 4 Oct 2026
- Docker
- The README documents running the migrate CLI in Docker with a mounted migration directory.checked 4 Oct 2026
- Graceful stopping
- The library supports graceful stops through a GracefulStop channel to help prevent database corruption.checked 4 Oct 2026
- Library compatibility
- The README describes the v3 and v4 library API as stable and frozen for those releases.checked 4 Oct 2026
- Library properties
- The README says the library uses io.Reader streams for low memory overhead and is thread-safe with no goroutine leaks.checked 4 Oct 2026
- License
- The project is distributed under the MIT License, which requires retaining the copyright and permission notices.checked 4 Oct 2026
- Migration files
- Each logical migration has an up file and a down file.checked 4 Oct 2026
- Migration sources
- Sources include local filesystem, embedded Go data, GitHub, GitLab, Bitbucket, AWS S3, and Google Cloud Storage.checked 4 Oct 2026
- Purpose
- golang-migrate reads database migrations from sources and applies them to a database in order.checked 4 Oct 2026
- Security reporting
- The security policy asks reporters to start a GitHub security advisory and suggest potential impact and urgency.checked 4 Oct 2026
- Supported versions
- The security policy marks master and 4.x as supported, while 3.x and earlier are unsupported.checked 4 Oct 2026
- Ways to use
- The project can be used as a command-line tool or imported as a Go library.checked 4 Oct 2026
Alternatives to golang-migrate
- 1

Atlas
Free planOpen sourceWebAPILinuxmacOS8.3From $39 a month - 2
DeepFilterNet
Free planOpen sourceAPILinuxmacOSSelf-hosted7.6Free plan - 3
pgroll
Free planOpen sourceLinuxmacOSSelf-hostedWindows7.3Free plan - 4

Skeema
Free planLinuxmacOSWindows6.9From $649 a year - 5

Bytebase Enterprise
Free planWebAPISelf-hosted6.8From $20 a month - 6
Sqitch
Free planLinuxmacOSSelf-hostedWindows6.7Free plan
