mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-20 14:00:04 +02:00
Fix Migration 176 yet again (#15131)
* Fix Migration 176 yet again Whilst creating a test for v176 in the migrations_test PR it has become clear that this was still wrong. This is now fixed. Genuinely. Signed-off-by: Andrew Thornton <art27@cantab.net> * and fix repo transfer Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
parent
f4e677edb1
commit
750ac52db2
3 changed files with 10 additions and 9 deletions
|
@ -52,7 +52,7 @@ func removeInvalidLabels(x *xorm.Engine) error {
|
|||
INNER JOIN issue on issue.id = il_too_too.issue_id
|
||||
INNER JOIN repository on repository.id = issue.repo_id
|
||||
WHERE
|
||||
issue.repo_id != label.repo_id OR (label.repo_id = 0 AND label.org_id != repository.owner_id)
|
||||
(label.org_id = 0 AND issue.repo_id != label.repo_id) OR (label.repo_id = 0 AND label.org_id != repository.owner_id)
|
||||
) AS il_too )`); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ func removeInvalidLabels(x *xorm.Engine) error {
|
|||
INNER JOIN issue on issue.id = com.issue_id
|
||||
INNER JOIN repository on repository.id = issue.repo_id
|
||||
WHERE
|
||||
com.type = ? AND (issue.repo_id != label.repo_id OR (label.repo_id = 0 AND label.org_id != repository.owner_id))
|
||||
com.type = ? AND ((label.org_id = 0 AND issue.repo_id != label.repo_id) OR (label.repo_id = 0 AND label.org_id != repository.owner_id))
|
||||
) AS il_too)`, 7); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue