Rename db Engines related functions (#17481)

* Rename db Engines related functions

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Lunny Xiaoandwxiaoguang authored and GitHub committed 2021-10-30 22:32:11 +08:00
1 parent 76a3190b8a
commit 63c0dc89ef
14 files changed
+31 -31

No files matched your search

+2 -2
View File
@@ -96,7 +96,7 @@ func runRecreateTable(ctx *cli.Context) error {
setting.Cfg.Section("log").Key("XORM").SetValue(",")
setting.NewXORMLogService(!ctx.Bool("debug"))
if err := db.SetEngine(); err != nil {
if err := db.InitEngine(); err != nil {
fmt.Println(err)
fmt.Println("Check if you are using the right config file. You can use a --config directive to specify one.")
return nil
@@ -114,7 +114,7 @@ func runRecreateTable(ctx *cli.Context) error {
}
recreateTables := migrations.RecreateTables(beans...)
return db.NewEngine(context.Background(), func(x *xorm.Engine) error {
return db.InitEngineWithMigration(context.Background(), func(x *xorm.Engine) error {
if err := migrations.EnsureUpToDate(x); err != nil {
return err
}