KingDownloads

migrate

by golang-migrate 18.7k stars NOASSERTIONData & Database
Download

About migrate

Migrate is a database migration tool written in Go. It handles schema changes and version control for databases, supporting both CLI usage and integration as a library in Go projects.

The tool reads migrations from various sources and applies them in the correct order to supported databases. It emphasizes simplicity and reliability, with drivers designed to be lightweight and fail explicitly on invalid input.

Key features

  • Supports multiple databases including PostgreSQL, MySQL, MongoDB, and SQLite
  • Reads migrations from filesystems, GitHub, AWS S3, and other sources
  • Provides both CLI and Go library interfaces
  • Handles database connection strings via URL formats
  • Supports graceful stops to prevent database corruption
  • Thread-safe with no goroutine leaks
  • Uses io.Reader streams for low memory overhead

Download v4.19.1

Nov 29, 2025
View all 10 versions

Frequently asked questions

Is migrate free?
Yes. migrate is free and open-source software, distributed under the NOASSERTION license.
Which platforms does migrate support?
migrate provides downloads for Windows, macOS, Linux.
What is the latest version of migrate?
The latest version is v4.19.1, released on Nov 29, 2025.
What databases does migrate support?
Migrate supports PostgreSQL, MySQL, MariaDB, MongoDB, SQLite, Neo4j, Cassandra, and several other databases. The full list includes both SQL and NoSQL options.
How do I use migrate as a Go library?
Import the migrate package in your Go project along with the required database driver. Use the New or NewWithDatabaseInstance functions to create a migration instance, then call methods like Up or Steps to run migrations.
What formats are supported for migration files?
Each migration requires separate up and down SQL files, named with a timestamp or version number prefix. The up file applies changes while the down file reverses them.
Is there Docker support for the CLI?
Yes, migrate provides a Docker image that can be run with volume mounts for migration files and network access to your database.

More Data & Database