aboutsummaryrefslogtreecommitdiffstats
path: root/models/migrations/v1_20/v244.go
blob: 76cdccaca5b66d3fec12b21a8dec24a3a66d70a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright 2023 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_20

import (
	"xorm.io/xorm"
)

func AddNeedApprovalToActionRun(x *xorm.Engine) error {
	/*
		New index: TriggerUserID
		New fields: NeedApproval, ApprovedBy
	*/
	type ActionRun struct {
		TriggerUserID int64 `xorm:"index"`
		NeedApproval  bool  // may need approval if it's a fork pull request
		ApprovedBy    int64 `xorm:"index"` // who approved
	}

	return x.Sync(new(ActionRun))
}