mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Explicitly not update indexes when sync database schemas (#34281)
Fix #34275 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -19,5 +19,9 @@ func AddCommentMetaDataColumn(x *xorm.Engine) error {
|
||||
CommentMetaData *CommentMetaData `xorm:"JSON TEXT"` // put all non-index metadata in a single field
|
||||
}
|
||||
|
||||
return x.Sync(new(Comment))
|
||||
_, err := x.SyncWithOptions(xorm.SyncOptions{
|
||||
IgnoreConstrains: true,
|
||||
IgnoreIndices: true,
|
||||
}, new(Comment))
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user