summaryrefslogtreecommitdiffstats
path: root/models/migrations/v102.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-10-18 19:13:31 +0800
committerGitHub <noreply@github.com>2019-10-18 19:13:31 +0800
commit945f121262ef5a393d9530b62a82b2c141bbe21c (patch)
tree13d4d91da9a75295ee3455ff183a61c4d3fbb3ad /models/migrations/v102.go
parentfecd8f949dedac0751db99dec590ff12ae56818d (diff)
downloadgitea-945f121262ef5a393d9530b62a82b2c141bbe21c.tar.gz
gitea-945f121262ef5a393d9530b62a82b2c141bbe21c.zip
Fix bug on pull requests when transfer head repository (#8564)
* fix bug on pull requests when transfer head repository * add migration and fix lint * fix tests and add a cache check on LoadBaseRepo
Diffstat (limited to 'models/migrations/v102.go')
-rw-r--r--models/migrations/v102.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/models/migrations/v102.go b/models/migrations/v102.go
new file mode 100644
index 0000000000..74e8574ec3
--- /dev/null
+++ b/models/migrations/v102.go
@@ -0,0 +1,15 @@
+// Copyright 2019 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 (
+ "xorm.io/xorm"
+)
+
+func dropColumnHeadUserNameOnPullRequest(x *xorm.Engine) error {
+ sess := x.NewSession()
+ defer sess.Close()
+ return dropTableColumns(sess, "pull_request", "head_user_name")
+}