From d325a66fee62380ae99a91573d8e4f6b23fc0a8f Mon Sep 17 00:00:00 2001 From: astaxie Date: Tue, 12 Aug 2014 16:35:59 +0800 Subject: [PATCH] update the error info --- migration/migration.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/migration/migration.go b/migration/migration.go index 03612237..71f8be35 100644 --- a/migration/migration.go +++ b/migration/migration.go @@ -131,6 +131,7 @@ func Upgrade(lasttime int64) error { v.m.Up() err := v.m.Exec(v.name, "up") if err != nil { + beego.Error("execute error:", err) return err } beego.Info("end upgrade:", v.name) @@ -148,6 +149,7 @@ func Rollback(name string) error { v.Down() err := v.Exec(name, "down") if err != nil { + beego.Error("execute error:", err) return err } beego.Info("end rollback") @@ -166,6 +168,7 @@ func Reset() error { v.Down() err := v.Exec(k, "down") if err != nil { + beego.Error("execute error:", err) return err } beego.Info("end reset:", k) @@ -178,6 +181,7 @@ func Reset() error { func Refresh() error { err := Reset() if err != nil { + beego.Error("execute error:", err) return err } return Upgrade(0)