mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 14:30:56 +00:00
update the error info
This commit is contained in:
parent
fe9017c819
commit
d325a66fee
@ -131,6 +131,7 @@ func Upgrade(lasttime int64) error {
|
|||||||
v.m.Up()
|
v.m.Up()
|
||||||
err := v.m.Exec(v.name, "up")
|
err := v.m.Exec(v.name, "up")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
beego.Error("execute error:", err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
beego.Info("end upgrade:", v.name)
|
beego.Info("end upgrade:", v.name)
|
||||||
@ -148,6 +149,7 @@ func Rollback(name string) error {
|
|||||||
v.Down()
|
v.Down()
|
||||||
err := v.Exec(name, "down")
|
err := v.Exec(name, "down")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
beego.Error("execute error:", err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
beego.Info("end rollback")
|
beego.Info("end rollback")
|
||||||
@ -166,6 +168,7 @@ func Reset() error {
|
|||||||
v.Down()
|
v.Down()
|
||||||
err := v.Exec(k, "down")
|
err := v.Exec(k, "down")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
beego.Error("execute error:", err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
beego.Info("end reset:", k)
|
beego.Info("end reset:", k)
|
||||||
@ -178,6 +181,7 @@ func Reset() error {
|
|||||||
func Refresh() error {
|
func Refresh() error {
|
||||||
err := Reset()
|
err := Reset()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
beego.Error("execute error:", err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return Upgrade(0)
|
return Upgrade(0)
|
||||||
|
Loading…
Reference in New Issue
Block a user