This commit is contained in:
@@ -3,11 +3,9 @@
|
||||
|
||||
package v1_26
|
||||
|
||||
import (
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
import "gitea.dev/models/db"
|
||||
|
||||
func FixMissedRepoIDWhenMigrateAttachments(x *xorm.Engine) error {
|
||||
func FixMissedRepoIDWhenMigrateAttachments(x db.EngineMigration) error {
|
||||
_, err := x.Exec("UPDATE `attachment` SET `repo_id` = (SELECT `repo_id` FROM `issue` WHERE `issue`.`id` = `attachment`.`issue_id`) WHERE `issue_id` > 0 AND (`repo_id` IS NULL OR `repo_id` = 0);")
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user