Skip to content

Commit 2cea89c

Browse files
GustedSysoev, Vladimir
Gusted
authored and
Sysoev, Vladimir
committed
Backtick table name in generic orphan check (go-gitea#20019)
1 parent ec2e9c7 commit 2cea89c

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)