From bba0119a95e735e0f387a82b21faa3f8bd7a6fa7 Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 28 Jan 2024 11:45:23 +0800 Subject: [PATCH] Fix model update and print statement in migrate command --- cmd/migrate.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/migrate.go b/cmd/migrate.go index 9c12e240..fcc59804 100644 --- a/cmd/migrate.go +++ b/cmd/migrate.go @@ -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 {