gitea源码

v319.go 392B

1234567891011121314151617181920
  1. // Copyright 2025 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package v1_24
  4. import (
  5. "xorm.io/xorm"
  6. )
  7. func AddExclusiveOrderColumnToLabelTable(x *xorm.Engine) error {
  8. type Label struct {
  9. ExclusiveOrder int `xorm:"DEFAULT 0"`
  10. }
  11. _, err := x.SyncWithOptions(xorm.SyncOptions{
  12. IgnoreConstrains: true,
  13. IgnoreIndices: true,
  14. }, new(Label))
  15. return err
  16. }