[GITEA] Fix orphan check for deleted branch

- Modify the deleted branch orphan check to check for the new table instead.
- Regression from 6e19484f4d
- Resolves https://codeberg.org/forgejo/forgejo/issues/1522
This commit is contained in:
Gusted 2023-09-27 10:28:58 +02:00
parent de5bb2a224
commit c1d888686f
No known key found for this signature in database
GPG key ID: FD821B732837125F

View file

@ -168,9 +168,9 @@ func checkDBConsistency(ctx context.Context, logger log.Logger, autofix bool) er
// find protected branches without existing repository // find protected branches without existing repository
genericOrphanCheck("Protected Branches without existing repository", genericOrphanCheck("Protected Branches without existing repository",
"protected_branch", "repository", "protected_branch.repo_id=repository.id"), "protected_branch", "repository", "protected_branch.repo_id=repository.id"),
// find deleted branches without existing repository // find branches without existing repository
genericOrphanCheck("Deleted Branches without existing repository", genericOrphanCheck("Branches without existing repository",
"deleted_branch", "repository", "deleted_branch.repo_id=repository.id"), "branch", "repository", "branch.repo_id=repository.id"),
// find LFS locks without existing repository // find LFS locks without existing repository
genericOrphanCheck("LFS locks without existing repository", genericOrphanCheck("LFS locks without existing repository",
"lfs_lock", "repository", "lfs_lock.repo_id=repository.id"), "lfs_lock", "repository", "lfs_lock.repo_id=repository.id"),