Skip to content

delete-orphaned-repos fails with syntax error (postgresql) #28199

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pitpalme opened this issue Nov 24, 2023 · 0 comments · Fixed by #28200
Closed

delete-orphaned-repos fails with syntax error (postgresql) #28199

pitpalme opened this issue Nov 24, 2023 · 0 comments · Fixed by #28200
Labels
Milestone

Comments

@pitpalme
Copy link
Contributor

Description

Running gitea doctor --run delete-orphaned-repos against PostgreSQL-driven instance fails with syntax error.

PostgreSQL can't handle unquoted table name for "user" table.
Some source code already contains backtick around table name, modules/doctor/repository.go:29 and modules/doctor/repository.go:49 does not, yet.

Tested with v1.21 and main branch.

Gitea Version

1.21.0

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

  • gitea binary
  • docker container
  • self build

Database

PostgreSQL

@lunny lunny added this to the 1.21.1 milestone Nov 24, 2023
lunny pushed a commit that referenced this issue Nov 24, 2023
gitea doctor failed at checking and fixing 'delete-orphaned-repos',
because table name 'user' needs quoting to be correctly recognized by at
least PostgreSQL.

fixes #28199
pitpalme added a commit to pitpalme/gitea that referenced this issue Nov 24, 2023
Backport go-gitea#28200

gitea doctor failed at checking and fixing 'delete-orphaned-repos',
because table name 'user' needs quoting to be correctly recognized by at
least PostgreSQL.

fixes go-gitea#28199
techknowlogick pushed a commit that referenced this issue Nov 24, 2023
Backport #28200

gitea doctor failed at checking and fixing 'delete-orphaned-repos',
because table name 'user' needs quoting to be correctly recognized by at
least PostgreSQL.

fixes #28199
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 9, 2024
fuxiaohei pushed a commit to fuxiaohei/gitea that referenced this issue Jan 17, 2024
gitea doctor failed at checking and fixing 'delete-orphaned-repos',
because table name 'user' needs quoting to be correctly recognized by at
least PostgreSQL.

fixes go-gitea#28199
silverwind pushed a commit to silverwind/gitea that referenced this issue Feb 20, 2024
gitea doctor failed at checking and fixing 'delete-orphaned-repos',
because table name 'user' needs quoting to be correctly recognized by at
least PostgreSQL.

fixes go-gitea#28199
project-mirrors-bot-tu bot pushed a commit to project-mirrors/forgejo-as-gitea-fork that referenced this issue Jan 23, 2025
Backport go-gitea#28200

gitea doctor failed at checking and fixing 'delete-orphaned-repos',
because table name 'user' needs quoting to be correctly recognized by at
least PostgreSQL.

fixes go-gitea#28199

(cherry picked from commit 7cae4df)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants