Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. goose

goose

NOASSERTIONGov3.28.0

A database migration tool for Go that supports SQL migrations and Go functions, compatible with multiple databases.

Visit WebsiteGitHubGitHub
11.4k stars695 forks0 contributors

What is goose?

Goose is a database migration tool designed for Go applications, providing both a CLI and a library to manage database schema changes through incremental SQL or Go-based migrations. It solves the problem of versioning and applying database changes consistently across different environments and database systems.

Target Audience

Go developers and teams who need a reliable, database-agnostic migration tool to manage schema changes in applications using PostgreSQL, MySQL, SQLite, or other supported databases.

Value Proposition

Developers choose Goose for its simplicity, support for both SQL and Go migrations, compatibility with multiple databases, and hybrid versioning system that prevents conflicts in collaborative development.

Overview

A database migration tool. Supports SQL migrations and Go functions.

Use Cases

Best For

  • Managing database schema changes in Go applications
  • Applying incremental SQL migrations across multiple database systems
  • Writing complex migrations as Go functions for advanced logic
  • Embedding migration files directly into Go binaries for deployment
  • Handling out-of-order migrations in team development workflows
  • Using environment variables to parameterize SQL migration scripts

Not Ideal For

  • Projects not using Go, as it's a Go-specific tool with library integration
  • Teams wanting a graphical or web-based migration interface without CLI reliance
  • Environments requiring built-in, automated rollback strategies for complex multi-step migrations
  • Applications heavily dependent on ORMs with integrated migration systems (e.g., GORM's AutoMigrate)

Pros & Cons

Pros

Broad Database Compatibility

Supports a wide range of databases including PostgreSQL, MySQL, SQLite, Spanner, and more, as listed in the README's driver examples.

Flexible Migration Types

Allows both SQL migrations and Go-based migrations for complex logic, enabling programmatic changes like data transformations.

Embedded Migration Support

Integrates with Go's embed package to compile migration files into binaries, simplifying deployment by eliminating external file dependencies.

Hybrid Versioning System

Uses timestamps for development and sequential numbering for production to prevent conflicts in team environments, as recommended in the README.

Cons

Custom Binary Requirement

Go migrations require building a custom goose binary, adding setup overhead compared to drop-in SQL-only tools.

Transaction Limitations

Certain SQL operations like CREATE DATABASE cannot run in transactions without explicit annotations, complicating migration writing.

MySQL-Specific Configuration

Requires enabling parseTime and multiStatements flags for MySQL, which can lead to errors if missed, as noted in the status command section.

Frequently Asked Questions

Quick Stats

Stars11,429
Forks695
Contributors0
Open Issues91
Last commit3 days ago
CreatedSince 2016

Tags

#migration#database#version-control#devops#postgres#go-library#schema#cli-tool#migrations#sql-migrations#database-migrations#multi-database#golang#mysql#schema-management#sqlite#go#sql

Built With

G
Go

Links & Resources

Website

Included in

Go169.1k
Auto-fetched 3 hours ago

Related Projects

migratemigrate

Database migrations. CLI and Golang library.

Stars18,903
Forks1,607
Last commit11 hours ago
BytebaseBytebase

Database governance built for humans and agents — controlling changes and access across every major database.

Stars14,468
Forks983
Last commit4 hours ago
AtlasAtlas

Declarative schema migrations with schema-as-code workflows

Stars8,709
Forks373
Last commit4 days ago
dbmatedbmate

🚀 A lightweight, framework-agnostic database migration tool.

Stars7,342
Forks374
Last commit5 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub