summaryrefslogtreecommitdiffstats
path: root/models/migrations
diff options
context:
space:
mode:
Diffstat (limited to 'models/migrations')
-rw-r--r--models/migrations/migrations.go2
-rw-r--r--models/migrations/v190.go24
2 files changed, 26 insertions, 0 deletions
diff --git a/models/migrations/migrations.go b/models/migrations/migrations.go
index fed7b909c1..9b04a364ca 100644
--- a/models/migrations/migrations.go
+++ b/models/migrations/migrations.go
@@ -329,6 +329,8 @@ var migrations = []Migration{
NewMigration("Add key is verified to gpg key", addKeyIsVerified),
// v189 -> v190
NewMigration("Unwrap ldap.Sources", unwrapLDAPSourceCfg),
+ // v190 -> v191
+ NewMigration("Add agit flow pull request support", addAgitFlowPullRequest),
}
// GetCurrentDBVersion returns the current db version
diff --git a/models/migrations/v190.go b/models/migrations/v190.go
new file mode 100644
index 0000000000..8d1fba8373
--- /dev/null
+++ b/models/migrations/v190.go
@@ -0,0 +1,24 @@
+// Copyright 2021 The Gitea Authors. All rights reserved.
+// Use of this source code is governed by a MIT-style
+// license that can be found in the LICENSE file.
+
+package migrations
+
+import (
+ "fmt"
+
+ "xorm.io/xorm"
+)
+
+func addAgitFlowPullRequest(x *xorm.Engine) error {
+ type PullRequestFlow int
+
+ type PullRequest struct {
+ Flow PullRequestFlow `xorm:"NOT NULL DEFAULT 0"`
+ }
+
+ if err := x.Sync2(new(PullRequest)); err != nil {
+ return fmt.Errorf("sync2: %v", err)
+ }
+ return nil
+}