diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2023-09-24 00:48:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-24 01:48:50 +0300 |
commit | eae6985b63e332e0f6e63b3922d1eae2f4ec1108 (patch) | |
tree | 87ca52cf184ba841c66cbea6292a7561074788fa /modules/doctor | |
parent | d8583edfe7583437e8b6b334bf666cf1beff613e (diff) | |
download | gitea-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.go | 2 |
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"), |