From d7b2af5782a26a6a4b66a95485db6a0166273fad Mon Sep 17 00:00:00 2001 From: silentcode Date: Fri, 20 May 2022 09:03:31 +0200 Subject: [PATCH] [doctor] pq: syntax error at or near "." quote user table name (cherry picked from commit 5d975a52cb67b04c6454c9e3ead83da8c0f3aa3d) --- modules/doctor/dbconsistency.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/doctor/dbconsistency.go b/modules/doctor/dbconsistency.go index 53c988897cd60..dea33d97fe212 100644 --- a/modules/doctor/dbconsistency.go +++ b/modules/doctor/dbconsistency.go @@ -188,10 +188,10 @@ func checkDBConsistency(logger log.Logger, autofix bool) error { "action", "repository", "action.repo_id=repository.id"), // find OAuth2Grant without existing user genericOrphanCheck("Orphaned OAuth2Grant without existing User", - "oauth2_grant", "user", "oauth2_grant.user_id=user.id"), + "oauth2_grant", "user", "oauth2_grant.user_id=`user`.id"), // find OAuth2Application without existing user genericOrphanCheck("Orphaned OAuth2Application without existing User", - "oauth2_application", "user", "oauth2_application.uid=user.id"), + "oauth2_application", "user", "oauth2_application.uid=`user`.id"), // find OAuth2AuthorizationCode without existing OAuth2Grant genericOrphanCheck("Orphaned OAuth2AuthorizationCode without existing OAuth2Grant", "oauth2_authorization_code", "oauth2_grant", "oauth2_authorization_code.grant_id=oauth2_grant.id"),