Skip to content
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

Error: pq: relation "branch" does not exist whilst counting Branches without existing repository #27508

Closed
frnmst opened this issue Oct 7, 2023 · 3 comments
Labels
Milestone

Comments

@frnmst
Copy link

frnmst commented Oct 7, 2023

Description

After migrating from 1.20.4 to 1.20.5, I get this from Gitea's doctor which I always run after upgrading:

[9] Check consistency of database
 - [E] Error: pq: relation "branch" does not exist whilst counting Branches without existing repository
ERROR

The command I use is this one. It's a long one because GIT LFS checks take too long so I excluded them.

HOME=... GITEA_WORK_DIR=... /usr/bin/gitea -c ... doctor --run paths --run storage-archives \
--run storage-attachments --run storage-avatars --run storage-lfs --run storage-packages \
--run storages --run check-db-version --run check-db-consistency --run check-user-type \
--run authorized-keys --run script-type --run hooks --run recalculate-stars-number \
--run check-old-archives --run enable-push-options --run fix-broken-repo-units \
--run recalculate-merge-bases --run synchronize-repo-heads --run check-git-daemon-export-ok \
--run check-commit-graphs --run check-user-email --run check-user-names --fix

Gitea Version

1.20.5

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.39.2

Operating System

Debian 11

How are you running Gitea?

Debian package, Systemd

gitea/gitea,now 1.20.5+1 amd64 [installed]
  A painless self-hosted Git service.

Database

PostgreSQL

@frnmst frnmst added the type/bug label Oct 7, 2023
@lng2020
Copy link
Member

lng2020 commented Oct 23, 2023

Have you fixed this problem? That's a check for the orphan branch(a branch with no repo). But seems like your db has no branch table. That's pretty weird🤔

@frnmst
Copy link
Author

frnmst commented Oct 23, 2023

No, the problem is still there. There is no branch table in fact and I haven't deleted it, so...
gitea_database
Is it possible to do a CREATE TABLE or something?

@lunny lunny added this to the 1.20.6 milestone Oct 24, 2023
lunny added a commit that referenced this issue Oct 24, 2023
@lng2020
Copy link
Member

lng2020 commented Nov 1, 2023

Close as #27763 fix this one. If the bug still exists, feel free to reopen it.

@lng2020 lng2020 closed this as completed Nov 1, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants