This commit is contained in:
Minho 2018-02-28 16:29:26 +08:00
parent 44907fa966
commit 87f0f2faf8

View File

@ -90,7 +90,7 @@ func RegisterModel() {
new(models.Migration), new(models.Migration),
new(models.Label), new(models.Label),
) )
migrate.RegisterMigration() //migrate.RegisterMigration()
} }
// RegisterLogger 注册日志 // RegisterLogger 注册日志
@ -130,8 +130,8 @@ func RegisterCommand() {
ResolveCommand(os.Args[2:]) ResolveCommand(os.Args[2:])
Install() Install()
} else if len(os.Args) >= 2 && os.Args[1] == "version" { } else if len(os.Args) >= 2 && os.Args[1] == "version" {
ResolveCommand(os.Args[2:])
CheckUpdate() CheckUpdate()
os.Exit(0)
} else if len(os.Args) >= 2 && os.Args[1] == "migrate" { } else if len(os.Args) >= 2 && os.Args[1] == "migrate" {
ResolveCommand(os.Args[2:]) ResolveCommand(os.Args[2:])
migrate.RunMigration() migrate.RunMigration()
@ -295,7 +295,6 @@ func RegisterCache() {
beego.Error("初始化Redis缓存失败:",err) beego.Error("初始化Redis缓存失败:",err)
os.Exit(1) os.Exit(1)
} }
beego.Info(string(bc))
redisCache,err := beegoCache.NewCache("redis",string(bc)) redisCache,err := beegoCache.NewCache("redis",string(bc))
if err != nil { if err != nil {