examples/ogx/example/migrate
pablo 847a8a4e69 添加设计文档并进行了一些修改 2022-09-30 17:03:22 +08:00
..
migrations ogx 2022-09-15 14:19:50 +08:00
README.md ogx 2022-09-15 14:19:50 +08:00
go.mod 添加设计文档并进行了一些修改 2022-09-30 17:03:22 +08:00
go.sum 添加设计文档并进行了一些修改 2022-09-30 17:03:22 +08:00
main.go ogx 2022-09-15 14:19:50 +08:00

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)