File tree 2 files changed +27
-0
lines changed 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -302,6 +302,8 @@ var migrations = []Migration{
302
302
NewMigration ("Add Require Signed Commits to ProtectedBranch" , addRequireSignedCommits ),
303
303
// v123 -> v124
304
304
NewMigration ("Add original informations for reactions" , addReactionOriginals ),
305
+ // v124 -> v125
306
+ NewMigration ("Add columns to user and repository" , addUserRepoMissingColumns ),
305
307
}
306
308
307
309
// Migrate database to current version
Original file line number Diff line number Diff line change
1
+ // Copyright 2020 The Gitea Authors. All rights reserved.
2
+ // Use of this source code is governed by a MIT-style
3
+ // license that can be found in the LICENSE file.
4
+
5
+ package migrations
6
+
7
+ import (
8
+ "xorm.io/xorm"
9
+ )
10
+
11
+ func addUserRepoMissingColumns (x * xorm.Engine ) error {
12
+
13
+ type VisibleType int
14
+ type User struct {
15
+ PasswdHashAlgo string `xorm:"NOT NULL DEFAULT 'pbkdf2'"`
16
+ Visibility VisibleType `xorm:"NOT NULL DEFAULT 0"`
17
+ }
18
+
19
+ type Repository struct {
20
+ IsArchived bool `xorm:"INDEX"`
21
+ Topics []string `xorm:"TEXT JSON"`
22
+ }
23
+
24
+ return x .Sync2 (new (User ), new (Repository ))
25
+ }
You can’t perform that action at this time.
0 commit comments