1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-23 02:38:35 +00:00

Upgrade xorm to v1.3.9 and improve some migrations Sync (#29899)

Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
Lunny Xiao
2024-07-15 05:15:59 +08:00
committed by GitHub
parent 1064e817c4
commit 0d08bb6112
9 changed files with 39 additions and 10 deletions

View File

@@ -10,5 +10,9 @@ func AddCommentIDIndexofAttachment(x *xorm.Engine) error {
CommentID int64 `xorm:"INDEX"`
}
return x.Sync(&Attachment{})
_, err := x.SyncWithOptions(xorm.SyncOptions{
IgnoreDropIndices: true,
IgnoreConstrains: true,
}, &Attachment{})
return err
}