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

Closed
opened 2025-11-02 09:57:07 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @pitpalme on GitHub (Nov 24, 2023).

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

Originally created by @pitpalme on GitHub (Nov 24, 2023). ### 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
GiteaMirror added the type/bug label 2025-11-02 09:57:07 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12078