code.gitea.io/gitea@v1.21.7/models/migrations/v1_20/v244.go (about) 1 // Copyright 2023 The Gitea Authors. All rights reserved. 2 // SPDX-License-Identifier: MIT 3 4 package v1_20 //nolint 5 6 import ( 7 "xorm.io/xorm" 8 ) 9 10 func AddNeedApprovalToActionRun(x *xorm.Engine) error { 11 /* 12 New index: TriggerUserID 13 New fields: NeedApproval, ApprovedBy 14 */ 15 type ActionRun struct { 16 TriggerUserID int64 `xorm:"index"` 17 NeedApproval bool // may need approval if it's a fork pull request 18 ApprovedBy int64 `xorm:"index"` // who approved 19 } 20 21 return x.Sync(new(ActionRun)) 22 }