summaryrefslogtreecommitdiffstats
path: root/modules/doctor
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2023-09-24 00:48:50 +0200
committerGitHub <noreply@github.com>2023-09-24 01:48:50 +0300
commiteae6985b63e332e0f6e63b3922d1eae2f4ec1108 (patch)
tree87ca52cf184ba841c66cbea6292a7561074788fa /modules/doctor
parentd8583edfe7583437e8b6b334bf666cf1beff613e (diff)
downloadgitea-eae6985b63e332e0f6e63b3922d1eae2f4ec1108.tar.gz
gitea-eae6985b63e332e0f6e63b3922d1eae2f4ec1108.zip
Quote table `release` in sql queries (#27205) (#27219)
Backport of #27205 Fixes #27174 `release` is a reserved keyword in MySql. I can't reproduce the issue on my setup and we have a test for that code but it seems there can be setups where it fails.
Diffstat (limited to 'modules/doctor')
-rw-r--r--modules/doctor/dbconsistency.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/doctor/dbconsistency.go b/modules/doctor/dbconsistency.go
index 541fc736f4..5486873556 100644
--- a/modules/doctor/dbconsistency.go
+++ b/modules/doctor/dbconsistency.go
@@ -101,7 +101,7 @@ func checkDBConsistency(ctx context.Context, logger log.Logger, autofix bool) er
},
// find releases without existing repository
genericOrphanCheck("Orphaned Releases without existing repository",
- "release", "repository", "release.repo_id=repository.id"),
+ "release", "repository", "`release`.repo_id=repository.id"),
// find pulls without existing issues
genericOrphanCheck("Orphaned PullRequests without existing issue",
"pull_request", "issue", "pull_request.issue_id=issue.id"),