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