summaryrefslogtreecommitdiffstats
path: root/modules/doctor/dbconsistency.go
diff options
context:
space:
mode:
authorJason Song <i@wolfogre.com>2023-03-07 18:51:06 +0800
committerGitHub <noreply@github.com>2023-03-07 18:51:06 +0800
commitc84238800bb743181582f043ece9b44fef233c95 (patch)
tree83cf618233bb1a51c4a3325f8fa7662bb136afb1 /modules/doctor/dbconsistency.go
parent84a299310d9a8f6387f18a1711485b7f33e6f6b5 (diff)
downloadgitea-c84238800bb743181582f043ece9b44fef233c95.tar.gz
gitea-c84238800bb743181582f043ece9b44fef233c95.zip
Refactor `setting.Database.UseXXX` to methods (#23354)
Replace #23350. Refactor `setting.Database.UseMySQL` to `setting.Database.Type.IsMySQL()`. To avoid mismatching between `Type` and `UseXXX`. This refactor can fix the bug mentioned in #23350, so it should be backported.
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 bb560ac6a3..541fc736f4 100644
--- a/modules/doctor/dbconsistency.go
+++ b/modules/doctor/dbconsistency.go
@@ -155,7 +155,7 @@ func checkDBConsistency(ctx context.Context, logger log.Logger, autofix bool) er
// TODO: function to recalc all counters
- if setting.Database.UsePostgreSQL {
+ if setting.Database.Type.IsPostgreSQL() {
consistencyChecks = append(consistencyChecks, consistencyCheck{
Name: "Sequence values",
Counter: db.CountBadSequences,