Skip to content

Commit 6eaebda

Browse files
authored
Quote references to the user table in consistency checks (#18072) (#18073)
Backport #18072 Although #17487 ensured that the table was quoted in the join it missed that the query part of the check also needed to be quoted. Fix #17485 Signed-off-by: Andrew Thornton <[email protected]>
1 parent 6100935 commit 6eaebda

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/doctor/dbconsistency.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,13 @@ func checkDBConsistency(logger log.Logger, autofix bool) error {
159159
"lfs_lock", "repository", "lfs_lock.repo_id=repository.id"),
160160
// find collaborations without users
161161
genericOrphanCheck("Collaborations without existing user",
162-
"collaboration", "user", "collaboration.user_id=user.id"),
162+
"collaboration", "user", "collaboration.user_id=`user`.id"),
163163
// find collaborations without repository
164164
genericOrphanCheck("Collaborations without existing repository",
165165
"collaboration", "repository", "collaboration.repo_id=repository.id"),
166166
// find access without users
167167
genericOrphanCheck("Access entries without existing user",
168-
"access", "user", "access.user_id=user.id"),
168+
"access", "user", "access.user_id=`user`.id"),
169169
// find access without repository
170170
genericOrphanCheck("Access entries without existing repository",
171171
"access", "repository", "access.repo_id=repository.id"),

0 commit comments

Comments
 (0)