Skip to content

Commit 2e51f28

Browse files
Gustedearl-warren
authored andcommitted
fix orphan check for deleted branch
- Modify the deleted branch orphan check to check for the new table instead. - Regression from 6e19484 - Resolves https://codeberg.org/forgejo/forgejo/issues/1522 (cherry picked from commit c1d888686fe445e4edecb9d835c5b3893b574b75)
1 parent 5600504 commit 2e51f28

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/doctor/dbconsistency.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ func checkDBConsistency(ctx context.Context, logger log.Logger, autofix bool) er
168168
// find protected branches without existing repository
169169
genericOrphanCheck("Protected Branches without existing repository",
170170
"protected_branch", "repository", "protected_branch.repo_id=repository.id"),
171-
// find deleted branches without existing repository
172-
genericOrphanCheck("Deleted Branches without existing repository",
173-
"deleted_branch", "repository", "deleted_branch.repo_id=repository.id"),
171+
// find branches without existing repository
172+
genericOrphanCheck("Branches without existing repository",
173+
"branch", "repository", "branch.repo_id=repository.id"),
174174
// find LFS locks without existing repository
175175
genericOrphanCheck("LFS locks without existing repository",
176176
"lfs_lock", "repository", "lfs_lock.repo_id=repository.id"),

0 commit comments

Comments
 (0)