goose
Database migration tool
TLDR
SYNOPSIS
goose [options] command
DESCRIPTION
goose is a database migration tool that supports both SQL and Go migrations. It manages database schema changes by versioning migration files and tracking which migrations have been applied.
The tool supports PostgreSQL, MySQL, SQLite, SQL Server, and other databases, providing a consistent interface for schema migrations.
PARAMETERS
up
Migrate upup-by-one
Migrate up by one versiondown
Migrate downdown-to VERSION
Migrate down to specific versionstatus
Show migration statuscreate NAME TYPE
Create new migration (sql or go)fix
Apply sequential ordering to migrationsversion
Print goose version-dir DIR
Migrations directory (default: migrations)-table TABLE
Migrations table name (default: goosedbversion)-s, --allow-missing
Allow missing migrations-v, --version
Display version and exit-h, --help
Display help and exit
DATABASE DRIVERS
Supported databases:
- PostgreSQL
- MySQL/MariaDB
- SQLite3
- SQL Server
- ClickHouse
- Redshift
- TiDB
- Turso
CAVEATS
Requires database connection. Migration files must follow naming conventions. Down migrations should be tested carefully. Concurrent migrations may need locking.
HISTORY
goose was created as a language-agnostic migration tool supporting both SQL and Go-based migrations, filling the gap for Go developers needing database migrations.
SEE ALSO
[migrate](https://github.com/golang-migrate/migrate), [dbmate](https://github.com/amacneil/dbmate), [flyway](https://flywaydb.org/), [liquibase](https://www.liquibase.org/)

