summaryrefslogtreecommitdiffstats
path: root/models/migrations
diff options
context:
space:
mode:
authorSandro Santilli <strk@kbt.io>2017-03-20 09:31:08 +0100
committerKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2017-03-20 09:31:08 +0100
commit9182a35f18b6d5cd981486852028e670984145c3 (patch)
treecab69a27330df5a095de95017e8b40bf13598889 /models/migrations
parente1586898b2f0905b6f59383c01a3aed6b39de93a (diff)
downloadgitea-9182a35f18b6d5cd981486852028e670984145c3.tar.gz
gitea-9182a35f18b6d5cd981486852028e670984145c3.zip
Show user OpenID URIs in their profile (#1314)
Diffstat (limited to 'models/migrations')
-rw-r--r--models/migrations/migrations.go2
-rw-r--r--models/migrations/v25.go18
2 files changed, 20 insertions, 0 deletions
diff --git a/models/migrations/migrations.go b/models/migrations/migrations.go
index d06a4473b8..f651a9b787 100644
--- a/models/migrations/migrations.go
+++ b/models/migrations/migrations.go
@@ -98,6 +98,8 @@ var migrations = []Migration{
NewMigration("add user openid table", addUserOpenID),
// v24 -> v25
NewMigration("change the key_id and primary_key_id type", changeGPGKeysColumns),
+ // v25 -> v26
+ NewMigration("add show field in user openid table", addUserOpenIDShow),
}
// Migrate database to current version
diff --git a/models/migrations/v25.go b/models/migrations/v25.go
new file mode 100644
index 0000000000..a8d746590a
--- /dev/null
+++ b/models/migrations/v25.go
@@ -0,0 +1,18 @@
+// Copyright 2017 Gitea. 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"
+
+ "github.com/go-xorm/xorm"
+)
+
+func addUserOpenIDShow(x *xorm.Engine) error {
+ if err := x.Sync2(new(UserOpenID)); err != nil {
+ return fmt.Errorf("Sync2: %v", err)
+ }
+ return nil
+}