aboutsummaryrefslogtreecommitdiffstats
path: root/modules/doctor/dbconsistency.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-10-30 22:32:11 +0800
committerGitHub <noreply@github.com>2021-10-30 22:32:11 +0800
commit63c0dc89ef96a2e38b38aa6cba5e4e8d1d7b9150 (patch)
tree91da225f6e02bba47fbe5677e18d6617e43aedcd /modules/doctor/dbconsistency.go
parent76a3190b8a988e18a6b5d66dcc7324f04d83342f (diff)
downloadgitea-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 'modules/doctor/dbconsistency.go')
-rw-r--r--modules/doctor/dbconsistency.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/doctor/dbconsistency.go b/modules/doctor/dbconsistency.go
index 987bd58db8..040f73abcd 100644
--- a/modules/doctor/dbconsistency.go
+++ b/modules/doctor/dbconsistency.go
@@ -74,7 +74,7 @@ func genericOrphanCheck(name, subject, refobject, joincond string) consistencyCh
func checkDBConsistency(logger log.Logger, autofix bool) error {
// make sure DB version is uptodate
- if err := db.NewEngine(context.Background(), migrations.EnsureUpToDate); err != nil {
+ if err := db.InitEngineWithMigration(context.Background(), migrations.EnsureUpToDate); err != nil {
logger.Critical("Model version on the database does not match the current Gitea version. Model consistency will not be checked until the database is upgraded")
return err
}