mirror of
https://github.com/Fluffy-Bean/TastyBites.git
synced 2025-05-27 22:03:14 +00:00
Split migrate and downgrade commands
Rename Pending to GetPending
This commit is contained in:
parent
2bde65c5a2
commit
b8d9ded81e
4 changed files with 73 additions and 43 deletions
|
@ -16,15 +16,18 @@ func Parse() {
|
|||
run(os.Args[2:])
|
||||
case "migrate":
|
||||
migrate(os.Args[2:])
|
||||
case "downgrade":
|
||||
downgrade(os.Args[2:])
|
||||
case "status":
|
||||
status(os.Args[2:])
|
||||
case "-h":
|
||||
fallthrough
|
||||
case "-help":
|
||||
fmt.Println("Available commands are:")
|
||||
fmt.Println(" run: starts the server")
|
||||
fmt.Println(" migrate: migrates database")
|
||||
fmt.Println(" status: checks if there are pending migrations")
|
||||
fmt.Println(" run: starts the server")
|
||||
fmt.Println(" migrate: migrates database")
|
||||
fmt.Println(" downgrade: undoes database migrations")
|
||||
fmt.Println(" status: checks if there are pending migrations")
|
||||
fmt.Println("\nTo specific usages, run commandName -h")
|
||||
default:
|
||||
fmt.Println("Use -h or -help for usage")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue