Goose is a database migration tool that works as both a command-line interface and a library.
Goose solves the problem of managing database schema changes across multiple database systems by allowing developers to define migrations as either SQL files or Go functions. The tool applies migrations sequentially, tracking which ones have been executed and enabling rollback to specific versions. It supports out-of-order migrations, data seeding, and environment variable substitution within SQL files, giving teams flexibility in how they structure and execute schema changes.
Goose suits projects that need to manage database evolution across Postgres, MySQL, MariaDB, SQLite, Spanner, YDB, ClickHouse, MSSQL, Vertica, and other databases. It works well for teams that want to version control their schema changes and need both SQL and programmatic migration capabilities. The tool is available as a CLI binary or as a Go library for embedding in applications. Developers can choose between timestamp-based or sequential numbering for migration files, and the binary size can be reduced by excluding database drivers that are not needed.
The project maintains active engagement with its codebase, regularly addressing issues and accepting contributions. Development shows consistent responsiveness to user-reported problems and feature requests. The maintainers actively review and merge pull requests, indicating ongoing stewardship of the tool.