summaryrefslogtreecommitdiffstats
path: root/models/migrations/v1_22/v285.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--models/migrations/v1_22/v285.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/models/migrations/v1_22/v285.go b/models/migrations/v1_22/v285.go
new file mode 100644
index 0000000..a55cc17
--- /dev/null
+++ b/models/migrations/v1_22/v285.go
@@ -0,0 +1,22 @@
+// Copyright 2023 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package v1_22 //nolint
+
+import (
+ "time"
+
+ "xorm.io/xorm"
+)
+
+func AddPreviousDurationToActionRun(x *xorm.Engine) error {
+ type ActionRun struct {
+ PreviousDuration time.Duration
+ }
+
+ _, err := x.SyncWithOptions(xorm.SyncOptions{
+ IgnoreIndices: true,
+ IgnoreConstrains: true,
+ }, &ActionRun{})
+ return err
+}