File tree Expand file tree Collapse file tree 6 files changed +33
-9
lines changed Expand file tree Collapse file tree 6 files changed +33
-9
lines changed Original file line number Diff line number Diff line change @@ -289,6 +289,8 @@ var migrations = []Migration{
289
289
// v170 -> v171
290
290
NewMigration ("Add Dismissed to Review table" , addDismissedReviewColumn ),
291
291
// v171 -> v172
292
+ NewMigration ("Add Sorting to ProjectBoard table" , addSortingColToProjectBoard ),
293
+ // v172 -> v173
292
294
NewMigration ("Add agit style pull request support" , addAgitStylePullRequest ),
293
295
}
294
296
Original file line number Diff line number Diff line change @@ -10,14 +10,12 @@ import (
10
10
"xorm.io/xorm"
11
11
)
12
12
13
- func addAgitStylePullRequest (x * xorm.Engine ) error {
14
- type PullRequestStyle int
15
-
16
- type PullRequest struct {
17
- Style PullRequestStyle
13
+ func addSortingColToProjectBoard (x * xorm.Engine ) error {
14
+ type ProjectBoard struct {
15
+ Sorting int8 `xorm:"NOT NULL DEFAULT 0"`
18
16
}
19
17
20
- if err := x .Sync2 (new (PullRequest )); err != nil {
18
+ if err := x .Sync2 (new (ProjectBoard )); err != nil {
21
19
return fmt .Errorf ("Sync2: %v" , err )
22
20
}
23
21
return nil
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 addAgitStylePullRequest (x * xorm.Engine ) error {
14
+ type PullRequestStyle int
15
+
16
+ type PullRequest struct {
17
+ Style PullRequestStyle
18
+ }
19
+
20
+ if err := x .Sync2 (new (PullRequest )); err != nil {
21
+ return fmt .Errorf ("Sync2: %v" , err )
22
+ }
23
+ return nil
24
+ }
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ type ProjectBoard struct {
36
36
ID int64 `xorm:"pk autoincr"`
37
37
Title string
38
38
Default bool `xorm:"NOT NULL DEFAULT false"` // issues not assigned to a specific board will be assigned to this board
39
- Sorting int8 `xorm:"DEFAULT 0"`
39
+ Sorting int8 `xorm:"NOT NULL DEFAULT 0"`
40
40
41
41
ProjectID int64 `xorm:"INDEX NOT NULL"`
42
42
CreatorID int64 `xorm:"NOT NULL"`
Original file line number Diff line number Diff line change 9
9
//
10
10
// Schemes: http, https
11
11
// BasePath: /api/v1
12
- // Version: 1.1.1
12
+ // Version: {{AppVer}}
13
13
// License: MIT http://opensource.org/licenses/MIT
14
14
//
15
15
// Consumes:
Original file line number Diff line number Diff line change 19
19
"name": "MIT",
20
20
"url": "http://opensource.org/licenses/MIT"
21
21
},
22
- "version": "1.1.1 "
22
+ "version": "{{AppVer}} "
23
23
},
24
24
"basePath": "{{AppSubUrl}}/api/v1",
25
25
"paths": {
You can’t perform that action at this time.
0 commit comments