Skip to Content

Usage

The gormite cli needs to generate migrations sql instead of writting it yourself, but it’s not migration tool
Gormite uses one of supported tools

Supported tools:

  1. Goose
  2. Migrate

Prequirements

Create gormite.yaml where your heart desires
Paste this code here:

gormite.yaml
gormite: orm: mapping: Entities: dir: pkg/entities

Usage

gormite -t {goose, migrate} --dsn {DATABASE_URL} --config-path {your/path/to/config}

Cli flags:

FlagDescriptionAliasesRequiredDefault value
—toolMigration tool (backend)-t -m -mttrueNone
—dsnDatabase connection url, needs to calc-d -dbtrueNone
—config-pathPath to your gormite.yaml config-c —configfalseresources/gormite.yaml
Last updated on