A SQL schema migration tool for Go that works as both a CLI and library, supporting multiple databases.
sql-migrate is a SQL schema migration tool for Go that manages database schema changes through version-controlled SQL files. It solves the problem of evolving database schemas consistently across development, testing, and production environments. The tool supports both CLI usage and library integration, making it adaptable to various workflows.
Go developers and teams who need a reliable, SQL-based migration solution for applications using SQLite, PostgreSQL, MySQL, MSSQL, or Oracle databases.
Developers choose sql-migrate for its dual CLI/library design, multi-database support, and atomic migration capabilities. Its SQL-first approach provides transparency and control, avoiding opaque abstraction layers while ensuring safe rollbacks and environment consistency.
SQL schema migration tool for Go.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Can be used as a standalone CLI tool or embedded as a Go library, adapting to various deployment and development workflows, as highlighted in the README's feature list.
Supports SQLite, PostgreSQL, MySQL, MSSQL, and Oracle, covering most popular SQL databases through gorp integration, making it versatile for polyglot environments.
Ensures migrations are applied atomically with up/down rollbacks, preventing partial updates and allowing safe reversals, a core feature emphasized in the documentation.
Uses plain SQL files for migrations, giving developers full control over schema changes without abstraction layers, aligning with the project's philosophy of simplicity.
Requires external Oracle Instant Client and environment variable configuration for Oracle support, adding significant setup overhead and potential dependency issues.
Lacks auto-generation from Go structs or models; all migrations must be written as SQL files manually, which can be tedious for rapid iteration or large schema changes.
Requires a YAML configuration file for different environments, which might be cumbersome for simple projects or when integrating into existing complex setups.