File tree 2 files changed +24
-0
lines changed 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -288,6 +288,8 @@ var migrations = []Migration{
288
288
NewMigration ("Update DeleteBranch comments to set the old_ref to the commit_sha" , commentTypeDeleteBranchUseOldRef ),
289
289
// v170 -> v171
290
290
NewMigration ("Add Dismissed to Review table" , addDismissedReviewColumn ),
291
+ // v171 -> v172
292
+ NewMigration ("Add Sorting to ProjectBoard table" , addSortingColToProjectBoard ),
291
293
}
292
294
293
295
// GetCurrentDBVersion returns the current db version
Original file line number Diff line number Diff line change
1
+ // Copyright 2021 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
+ "fmt"
9
+
10
+ "xorm.io/xorm"
11
+ )
12
+
13
+ func addSortingColToProjectBoard (x * xorm.Engine ) error {
14
+ type ProjectBoard struct {
15
+ Sorting int8 `xorm:"DEFAULT 0"`
16
+ }
17
+
18
+ if err := x .Sync2 (new (ProjectBoard )); err != nil {
19
+ return fmt .Errorf ("Sync2: %v" , err )
20
+ }
21
+ return nil
22
+ }
You can’t perform that action at this time.
0 commit comments