Skip to content

Commit ab9fcb0

Browse files
authored
Backtick table name in generic orphan check (#20019) (#20037)
Backport #20019 - Resolves #20018
1 parent 2a48833 commit ab9fcb0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/doctor/dbconsistency.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,10 @@ func checkDBConsistency(ctx context.Context, logger log.Logger, autofix bool) er
201201
"oauth2_authorization_code", "oauth2_grant", "oauth2_authorization_code.grant_id=oauth2_grant.id"),
202202
// find stopwatches without existing user
203203
genericOrphanCheck("Orphaned Stopwatches without existing User",
204-
"stopwatch", "user", "stopwatch.user_id=user.id"),
204+
"stopwatch", "user", "stopwatch.user_id=`user`.id"),
205205
// find stopwatches without existing issue
206206
genericOrphanCheck("Orphaned Stopwatches without existing Issue",
207-
"stopwatch", "issue", "stopwatch.issue_id=issue.id"),
207+
"stopwatch", "issue", "stopwatch.issue_id=`issue`.id"),
208208
)
209209

210210
for _, c := range consistencyChecks {

0 commit comments

Comments
 (0)