Skip to content

Management Commands

Create and manage migrations.

queen create

Generate a new migration file from a template.

queen create NAME [flags]
Flag Type Default Description
--type string sql Migration type: sql or go

Examples

SQL migration:

queen create add_users_table

Creates a migration file in migrations/ with the next version based on your naming configuration.

Go migration:

queen create transform_data --type go

Creates a Go file template with UpFunc and DownFunc stubs.


queen squash

Warning

This command is not yet implemented and will return an error. It is reserved for a future release.

Combine multiple migrations into one.


queen baseline

Warning

This command is not yet implemented and will return an error. It is reserved for a future release.

Create a baseline from current schema. Uses the --at flag to specify the version number for the baseline.