Golang Migrate

Golang Migrate

github.com

2

About this website

Golang Migrate is a database migration tool and library written in Go, forked from the original mattes project and maintained by David Jensen (dhui). It provides both a command-line interface and a Go library API for managing database schema versioning across a wide variety of database systems. The tool supports over 20 database drivers including PostgreSQL with PGX v4 and v5, MySQL, MariaDB, SQLite, SQLCipher, ClickHouse, CockroachDB, YugabyteDB, Microsoft SQL Server, MongoDB, Cassandra, ScyllaDB, Neo4j, Google Cloud Spanner, Amazon Redshift, CrateDB, Firebird, and rqlite. Migration files can be sourced from filesystems, Go embed packages, GitHub repositories, GitHub Enterprise, Bitbucket, GitLab, AWS S3, Google Cloud Storage, and custom io readers. Each migration consists of paired up and down SQL files, enabling both forward and rollback operations. The library is designed to be thread-safe with graceful shutdown capabilities, using io.Reader streams to maintain a low memory footprint even when processing large migration files. The CLI supports concurrent migration locking, version forcing, and dirty state resolution for recovering from failed migrations. Pre-built Docker images are available for all supported databases, and the tool integrates seamlessly with CI/CD pipelines. With over 18,000 GitHub stars, the project is released under the MIT license and provides detailed tutorials, benchmarks, and migration strategy guides. The stable v4 release introduced Go modules support and a pluggable driver architecture that allows third-party database connectors to be added without modifying the core codebase.

Statistics

2
Views
0
Clicks
0
Like
0
Dislike

Comments

Log In to post a comment

No comments yet. Be the first!