Fix model update and print statement in migrate command
This commit is contained in:
parent
baab49be52
commit
bba0119a95
1 changed files with 1 additions and 2 deletions
|
|
@ -44,13 +44,12 @@ var migrateCmd = &cobra.Command{
|
|||
|
||||
if name != "" {
|
||||
mod, has := model.Models[name]
|
||||
fmt.Printf(color.WhiteString(L("Update schema model: %s (%s) "), mod.Name, mod.MetaData.Table.Name) + "\t")
|
||||
|
||||
if !has {
|
||||
fmt.Println(color.RedString(L("Model: %s does not exits"), name))
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Printf(color.WhiteString(L("Update schema model: %s (%s) "), mod.Name, mod.MetaData.Table.Name) + "\t")
|
||||
if resetModel {
|
||||
err := mod.DropTable()
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue