mirror of
https://github.com/beego/bee.git
synced 2025-07-05 18:20:18 +00:00
generate migration file
This commit is contained in:
6
g.go
6
g.go
@ -90,9 +90,9 @@ func generateCode(cmd *Command, args []string) {
|
||||
generateModel(string(driver), string(conn), string(level), curpath)
|
||||
case "migration":
|
||||
if len(args) == 2 {
|
||||
filename := args[1]
|
||||
ColorLog("[INFO] Using '%s' as migration file name\n", filename)
|
||||
generateMigration(filename, curpath)
|
||||
mname := args[1]
|
||||
ColorLog("[INFO] Using '%s' as migration name\n", mname)
|
||||
generateMigration(mname, curpath)
|
||||
} else {
|
||||
ColorLog("[ERRO] Wrong number of arguments\n")
|
||||
ColorLog("[HINT] Usage: bee generate migration [filename]\n")
|
||||
|
Reference in New Issue
Block a user