diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-10-30 22:32:11 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-30 22:32:11 +0800 |
commit | 63c0dc89ef96a2e38b38aa6cba5e4e8d1d7b9150 (patch) | |
tree | 91da225f6e02bba47fbe5677e18d6617e43aedcd /cmd/doctor.go | |
parent | 76a3190b8a988e18a6b5d66dcc7324f04d83342f (diff) | |
download | gitea-63c0dc89ef96a2e38b38aa6cba5e4e8d1d7b9150.tar.gz gitea-63c0dc89ef96a2e38b38aa6cba5e4e8d1d7b9150.zip |
Rename db Engines related functions (#17481)
* Rename db Engines related functions
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'cmd/doctor.go')
-rw-r--r-- | cmd/doctor.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/doctor.go b/cmd/doctor.go index 31708e990d..19b26f09c6 100644 --- a/cmd/doctor.go +++ b/cmd/doctor.go @@ -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 } |