gitea源码

v291.go 385B

12345678910111213141516171819
  1. // Copyright 2024 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package v1_22
  4. import "xorm.io/xorm"
  5. func AddCommentIDIndexofAttachment(x *xorm.Engine) error {
  6. type Attachment struct {
  7. CommentID int64 `xorm:"INDEX"`
  8. }
  9. _, err := x.SyncWithOptions(xorm.SyncOptions{
  10. IgnoreDropIndices: true,
  11. IgnoreConstrains: true,
  12. }, &Attachment{})
  13. return err
  14. }