Skip to content

Commit 2a03a8c

Browse files
committed
add index
1 parent 0e52255 commit 2a03a8c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

models/actions/run.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ type ActionRun struct {
4747
TriggerEvent string // the trigger event defined in the `on` configuration of the triggered workflow
4848
Status Status `xorm:"index"`
4949
Version int `xorm:"version default 0"` // Status could be updated concomitantly, so an optimistic lock is needed
50-
ConcurrencyGroup string
50+
ConcurrencyGroup string `xorm:"index"`
5151
ConcurrencyCancel bool
5252
// Started and Stopped is used for recording last run time, if rerun happened, they will be reset to 0
5353
Started timeutil.TimeStamp

models/actions/run_job.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ type ActionRunJob struct {
3939
RawConcurrencyGroup string // raw concurrency.group
4040
RawConcurrencyCancel string // raw concurrency.cancel-in-progress
4141
IsConcurrencyEvaluated bool // whether RawConcurrencyGroup have been evaluated, only valid when RawConcurrencyGroup is not empty
42-
ConcurrencyGroup string // evaluated concurrency.group
42+
ConcurrencyGroup string `xorm:"index"` // evaluated concurrency.group
4343
ConcurrencyCancel bool // evaluated concurrency.cancel-in-progress
4444

4545
Started timeutil.TimeStamp

models/migrations/v1_24/v320.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
func AddActionsConcurrency(x *xorm.Engine) error {
1111
type ActionRun struct {
12-
ConcurrencyGroup string
12+
ConcurrencyGroup string `xorm:"index"`
1313
ConcurrencyCancel bool
1414
}
1515

@@ -21,7 +21,7 @@ func AddActionsConcurrency(x *xorm.Engine) error {
2121
RawConcurrencyGroup string
2222
RawConcurrencyCancel string
2323
IsConcurrencyEvaluated bool
24-
ConcurrencyGroup string
24+
ConcurrencyGroup string `xorm:"index"`
2525
ConcurrencyCancel bool
2626
}
2727

0 commit comments

Comments
 (0)