OSS TanbouSign in with GitHub

apply versioned migrations in order from a CLI or Go library across multiple databases

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
18,954
Primary language
Go
License
MIT
Repository last updated
Sep 9, 2026
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.

Sources: [3][4][2]

Official sources

  1. [1]golang-migrate/migrate — GitHub repository(2026-10-06)
  2. [2]golang-migrate v4.20.1 — README(2026-10-06)
  3. [3]golang-migrate v4.20.1 — go.mod(2026-10-06)
  4. [4]golang-migrate v4.20.1 release(2026-10-06)
  5. [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. 1

    Get the source

    git clone --depth 1 https://github.com/golang-migrate/migrate.git
  2. 2

    Enter the repository

    cd migrate
  3. 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
Check the official README

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
Stars
18,954
Forks
1,620
Watchers
88
Open issues
313
Contributors
232
Owner type
Organization
Primary language
Go
License
MIT
Repository last updated
Sep 9, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?