Quote references to the user table in consistency checks () ()

Backport 

Although  ensured that the table was quoted in the join it missed that the
query part of the check also needed to be quoted.

Fix 

Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
zeripath 2021-12-22 23:29:05 +00:00 committed by GitHub
parent 6100935a77
commit 6eaebda1b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -159,13 +159,13 @@ func checkDBConsistency(logger log.Logger, autofix bool) error {
"lfs_lock", "repository", "lfs_lock.repo_id=repository.id"),
// find collaborations without users
genericOrphanCheck("Collaborations without existing user",
"collaboration", "user", "collaboration.user_id=user.id"),
"collaboration", "user", "collaboration.user_id=`user`.id"),
// find collaborations without repository
genericOrphanCheck("Collaborations without existing repository",
"collaboration", "repository", "collaboration.repo_id=repository.id"),
// find access without users
genericOrphanCheck("Access entries without existing user",
"access", "user", "access.user_id=user.id"),
"access", "user", "access.user_id=`user`.id"),
// find access without repository
genericOrphanCheck("Access entries without existing repository",
"access", "repository", "access.repo_id=repository.id"),