Skip to content

Commit 9888b70

Browse files
committed
update migration
1 parent 0f45fe5 commit 9888b70

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

models/migrations/migrations.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ func prepareMigrationTasks() []*migration {
369369
newMigration(309, "Improve Notification table indices", v1_23.ImproveNotificationTableIndices),
370370
newMigration(310, "Add Priority to ProtectedBranch", v1_23.AddPriorityToProtectedBranch),
371371
newMigration(311, "Add TimeEstimate to Issue table", v1_23.AddTimeEstimateColumnToIssueTable),
372-
// TODO: add AddConcurrencyGroupToActionRun
372+
// TODO: AddActionsConcurrency
373373
}
374374
return preparedMigrations
375375
}

models/migrations/v1_23/v312.go

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,22 @@ import (
77
"xorm.io/xorm"
88
)
99

10-
func AddConcurrencyGroupToActionRun(x *xorm.Engine) error {
10+
func AddActionsConcurrency(x *xorm.Engine) error {
1111
type ActionRun struct {
12-
ConcurrencyGroup string
12+
ConcurrencyGroup string
13+
ConcurrencyCancel bool
1314
}
1415

15-
return x.Sync(new(ActionRun))
16+
if err := x.Sync(new(ActionRun)); err != nil {
17+
return err
18+
}
19+
20+
type ActionRunJob struct {
21+
RawConcurrencyGroup string
22+
RawConcurrencyCancel string
23+
ConcurrencyGroup string
24+
ConcurrencyCancel bool
25+
}
26+
27+
return x.Sync(new(ActionRunJob))
1628
}

0 commit comments

Comments
 (0)