forked from opengaussexamples/examples
|
|
||
|---|---|---|
| .. | ||
| migrations | ||
| README.md | ||
| go.mod | ||
| go.sum | ||
| main.go | ||
README.md
Ogx migrations example
To run migrations:
OGXDEBUG=2 go run . db migrate
To rollback migrations:
go run . db rollback
To view status of migrations:
go run . db status
To create a Go migration:
go run . db create_go go_migration_name
To create a SQL migration:
go run . db create_sql sql_migration_name
To get help:
go run . db
NAME:
ogx db - database commands
USAGE:
ogx db command [command options] [arguments...]
COMMANDS:
init create migration tables
migrate migrate database
rollback rollback the last migration group
unlock unlock migrations
create_go create a Go migration
create_sql create a SQL migration
help, h Shows a list of commands or help for one command
OPTIONS:
--help, -h show help (default: false)