rubenv/sql-migrate

SQL schema migration tool for Go.

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 17 minutes ago
Added to GitGenius on September 20th, 2026
Created on September 9th, 2014
Open Issues & Pull Requests: 98 (+0)
GitHub issues: Enabled
Number of forks: 292
Total Stargazers: 3,417 (+0)
Total Subscribers: 32 (+0)

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 8
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 1,907 days
Stale 30+ days: 8
Stale 90+ days: 7

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

sql-migrate is a SQL schema migration tool for Go that works both as a standalone CLI tool and as an embeddable library.

The tool addresses the need to manage database schema changes in Go applications through version-controlled SQL migrations. It stores migration history in a database table and applies migrations sequentially, supporting both forward migrations and rollbacks. Migrations are written in plain SQL, giving developers full flexibility over schema changes. The tool can embed migrations directly into compiled Go binaries, eliminating external file dependencies at runtime.

The project suits Go applications that need reliable schema versioning across SQLite, PostgreSQL, MySQL, MSSQL, and Oracle databases. It works well for teams preferring SQL over abstraction layers and integrates naturally with other Go database libraries. The tool is particularly useful during development with its redo command, which unapplies and reapplies the most recent migration without manual intervention. For projects supporting multiple database systems, sql-migrate allows defining migrations that work across different database types within a single codebase.

Development activity shows consistent maintenance with regular updates addressing edge cases and database-specific requirements. The project maintains comprehensive test integration setups for each supported database, demonstrating attention to cross-platform compatibility. Documentation includes practical examples for different database configurations and setup patterns, reflecting responsiveness to real-world usage scenarios. The codebase remains actively refined with fixes for database-specific issues such as MySQL's parseTime requirement and Oracle driver options.