aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGusted2022-06-19 01:26:22 +0200
committerGitHub2022-06-19 07:26:22 +0800
commit909fb6ad20f2209e1c55d9c387614c42f001447a (patch)
tree3d54d39533ed3073e297578630cea906a98b3703
parente4ceaf65fbf626a7ccb97c0ee5a0108ea143b584 (diff)
Backtick table name in generic orphan check (#20019)
-rw-r--r--modules/doctor/dbconsistency.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/doctor/dbconsistency.go b/modules/doctor/dbconsistency.go
index 349a2121c..f8b62e898 100644
--- a/modules/doctor/dbconsistency.go
+++ b/modules/doctor/dbconsistency.go
@@ -201,10 +201,10 @@ func checkDBConsistency(ctx context.Context, logger log.Logger, autofix bool) er
"oauth2_authorization_code", "oauth2_grant", "oauth2_authorization_code.grant_id=oauth2_grant.id"),
// find stopwatches without existing user
genericOrphanCheck("Orphaned Stopwatches without existing User",
- "stopwatch", "user", "stopwatch.user_id=user.id"),
+ "stopwatch", "user", "stopwatch.user_id=`user`.id"),
// find stopwatches without existing issue
genericOrphanCheck("Orphaned Stopwatches without existing Issue",
- "stopwatch", "issue", "stopwatch.issue_id=issue.id"),
+ "stopwatch", "issue", "stopwatch.issue_id=`issue`.id"),
)
for _, c := range consistencyChecks {