goose (Go migrations)

Database migration tool for Go. Manages SQL schema migrations with versioned migration files. Supports SQL migrations (plain .sql files) and Go migrations (code-based for data migrations). CLI tool and Go library API. Works with PostgreSQL, MySQL, SQLite, CockroachDB. Used by popular Go projects including Temporal and Litestream.

Evaluated Mar 06, 2026 (0d ago) v3.x
Homepage ↗ Repo ↗ Developer Tools go database migrations sql postgres mysql sqlite cli versioned
⚙ Agent Friendliness
68
/ 100
Can an agent use this?
🔒 Security
86
/ 100
Is it safe for agents?
⚡ Reliability
83
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
85
Error Messages
82
Auth Simplicity
100
Rate Limits
100

🔒 Security

TLS Enforcement
90
Auth Strength
85
Scope Granularity
80
Dep. Hygiene
88
Secret Handling
85

Migration files may contain schema secrets — store in version control but ensure DB credentials in connection strings are not committed.

⚡ Reliability

Uptime/SLA
88
Version Stability
82
Breaking Changes
78
Error Recovery
85
AF Security Reliability

Best When

Go projects that need simple, file-based database migrations with rollback support.

Avoid When

Non-Go projects or when schema-first ORM approaches (ent, GORM AutoMigrate) are preferred.

Use Cases

  • Manage PostgreSQL/MySQL schema migrations in Go projects with versioned .sql files and up/down rollback
  • Embed goose migrations in Go binaries using embed.FS for self-contained deployment without external migration files
  • Run data migrations alongside schema migrations with Go-based migration functions for complex transformations
  • Integrate goose into CI/CD pipelines for automatic schema migration on deploy
  • Use as a library in Go services: goose.Up(db, migrationsDir) for programmatic migration execution

Not For

  • Non-Go projects — use Flyway, Liquibase, or Alembic for language-agnostic migration management
  • Schema generation from code — goose is migration-focused; use ent or sqlc for schema-first development
  • Distributed multi-region migrations — goose is single-region; coordinate migrations separately in multi-region deployments

Interface

REST API
No
GraphQL
No
gRPC
No
MCP Server
No
SDK
Yes
Webhooks
No

Authentication

Methods: none
OAuth: No Scopes: No

CLI/library tool — auth via database connection string.

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

MIT licensed open source tool.

Agent Metadata

Pagination
none
Idempotent
Full
Retry Guidance
Not documented

Known Gotchas

  • Migration files must follow naming convention: YYYYMMDDHHMMSS_description.sql — wrong format causes migrations to be skipped silently
  • goose v3.x changed the Go API — code using older v2 goose will need updates; always check which version you're importing
  • No-transaction migrations require -- +goose NO TRANSACTION annotation — DDL that can't run in a transaction (PostgreSQL CONCURRENTLY index creation) needs this
  • Down migrations are optional — if no Down section is provided, rollback (goose down) fails with an error
  • SQL dialect differences matter — goose SQL migrations are passed directly to the database; PostgreSQL $ placeholders differ from MySQL ?
  • Embedding migrations with embed.FS requires importing goose/v3/embed package — the embedding API changed in v3

Alternatives

Full Evaluation Report

Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for goose (Go migrations).

$99

Scores are editorial opinions as of 2026-03-06.

5215
Packages Evaluated
26151
Need Evaluation
173
Need Re-evaluation
Community Powered