On this page
Overview
golang-migrate/migrate is a database-migration CLI and Go library. It reads versioned migrations from filesystem, embedded, or remote sources and applies them through drivers for PostgreSQL, MySQL, SQLite, MongoDB, Spanner, ClickHouse, and other databases.
Features and best fit
Based on official documentation; not hands-on tested · Content checked:
Key features
Run up/down and version transitions from the CLI or Go API
It tracks migration versions and supports moving up, down, or to target versions. Failed migrations can leave a dirty state that blocks accidental continuation until explicitly handled.
Sources: [2]
Combine separate migration-source and database-driver layers
Filesystem, io/fs, cloud-storage, and other source drivers can be paired with PostgreSQL, PGX, MySQL, SQLite, MongoDB, Spanner, ClickHouse, and additional database drivers.
Sources: [2]
Best fit
Fits teams that want database schema versions synchronized with application deployments
It is useful in CI/CD and release jobs that need ordered schema changes and a consistent migration workflow across multiple database technologies.
Sources: [2]
Before adoption
v4.20.1 declares Go 1.25.11 and is primarily a distribution fix for v4.20.0
The v4.20.1 go.mod declares Go 1.25.11. The release immediately mitigates CI and release failures from v4.20.0 so the latest version can reach registries. Operationally, define concurrency protection, dirty-state recovery, destructive rollback policy, and correct escaping of database URLs.
Official sources
- [1]golang-migrate/migrate — GitHub repository(2026-10-06)
- [2]golang-migrate v4.20.1 — README(2026-10-06)
- [3]golang-migrate v4.20.1 — go.mod(2026-10-06)
- [4]golang-migrate v4.20.1 release(2026-10-06)
- [5]golang-migrate MIT license(2026-10-06)
Supplemental curator note
golang-migrate works as both a CLI and a library with separate migration-source and database-driver layers. Production workflows should define migration immutability, rollback policy, dirty-state recovery, and protection against concurrent migration runners.
Try it in 3 steps
- 1
Get the source
git clone --depth 1 https://github.com/golang-migrate/migrate.git - 2
Enter the repository
cd migrate - 3
Check the official steps
Continue with the commands in the README Installation, Quick Start, or Getting Started section.
find . -maxdepth 1 -iname 'README*' -exec sed -n '1,220p' {} \; -quit
Growth
Growth trends · Last 30 days
18,954 Stars
Trend data is still being collected.
Development activity
Last 90 days · weekly
- Commits (last 30 days)
- 7
- Open PRs
- 180
Development activity is still being collected.
Built with
Categories and tags
GitHub data
GitHub dataView detailed GitHub data
GitHub Topics
- go
- golang
- migration
- migrations
- database
- postgres
- cassandra
- sqlite
- mysql
- neo4j
- mongodb
- databases
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- Diesel14,193 Stars
4 shared tag(s) · 1 shared category(s)
validate SQL queries and schemas with Rust's type system through an ORM and query builder
Rust - node-postgres13,219 Stars
4 shared tag(s) · 1 shared category(s)
connect Node.js directly to PostgreSQL with pools, parameterized queries, and LISTEN/NOTIFY
JavaScript - MySQL Server12,441 Stars
4 shared tag(s) · 1 shared category(s)
Run relational workloads with InnoDB transactions, SQL, replication, and high-availability tooling
C++ - SeaORM9,914 Stars
4 shared tag(s) · 1 shared category(s)
manage asynchronous queries, relations, and migrations with a relational ORM for Rust
Rust - Postgres.js8,728 Stars
4 shared tag(s) · 1 shared category(s)
build parameterized SQL safely through tagged templates with a lightweight PostgreSQL client
JavaScript - MariaDB Server8,320 Stars
4 shared tag(s) · 1 shared category(s)
Provide MySQL-compatible protocols, pluggable storage engines, replication, and native vector search in one SQL database
C++
Report incorrect information
Tell us if any listing information is incorrect or outdated.