Skip to content

Commit ba6efb1

Browse files
authored
Quote references to the user table in consistency checks (#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 d097fd6 commit ba6efb1

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
@@ -167,13 +167,13 @@ func checkDBConsistency(logger log.Logger, autofix bool) error {
167167
"lfs_lock", "repository", "lfs_lock.repo_id=repository.id"),
168168
// find collaborations without users
169169
genericOrphanCheck("Collaborations without existing user",
170-
"collaboration", "user", "collaboration.user_id=user.id"),
170+
"collaboration", "user", "collaboration.user_id=`user`.id"),
171171
// find collaborations without repository
172172
genericOrphanCheck("Collaborations without existing repository",
173173
"collaboration", "repository", "collaboration.repo_id=repository.id"),
174174
// find access without users
175175
genericOrphanCheck("Access entries without existing user",
176-
"access", "user", "access.user_id=user.id"),
176+
"access", "user", "access.user_id=`user`.id"),
177177
// find access without repository
178178
genericOrphanCheck("Access entries without existing repository",
179179
"access", "repository", "access.repo_id=repository.id"),

0 commit comments

Comments
 (0)