basic-migrator/

directory
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2026 License: Apache-2.0

README

Basic Queen Migrator

This example shows the recommended shape for application-owned migrations:

basic-migrator/
  cmd/migrate/main.go
  migrations/migrations.go
  migrations/001_create_users.go
  migrations/002_add_user_slug.go
  migrations/003_backfill_profiles.go

This example compiles inside the Queen repository. When copying it into your application, change the migrations import in cmd/migrate/main.go to your application's module path and add github.com/dmedovich/queen as a dependency.

go run ./cmd/migrate status --driver postgres --dsn "$DATABASE_URL"
go run ./cmd/migrate plan --driver postgres --dsn "$DATABASE_URL"
go run ./cmd/migrate up --driver postgres --dsn "$DATABASE_URL" --yes

Directories

Path Synopsis
cmd
migrate command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL