gitea源码

v74.go 445B

12345678910111213141516
  1. // Copyright 2018 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package v1_7
  4. import "xorm.io/xorm"
  5. func AddApprovalWhitelistsToProtectedBranches(x *xorm.Engine) error {
  6. type ProtectedBranch struct {
  7. ApprovalsWhitelistUserIDs []int64 `xorm:"JSON TEXT"`
  8. ApprovalsWhitelistTeamIDs []int64 `xorm:"JSON TEXT"`
  9. RequiredApprovals int64 `xorm:"NOT NULL DEFAULT 0"`
  10. }
  11. return x.Sync(new(ProtectedBranch))
  12. }