File tree 3 files changed +22
-0
lines changed
3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 1
1
-
2
2
id : 1
3
3
title : First project
4
+ owner_id : 0
4
5
repo_id : 1
5
6
is_closed : false
6
7
creator_id : 2
10
11
-
11
12
id : 2
12
13
title : second project
14
+ owner_id : 0
13
15
repo_id : 3
14
16
is_closed : false
15
17
creator_id : 3
19
21
-
20
22
id : 3
21
23
title : project on repo with disabled project
24
+ owner_id : 0
22
25
repo_id : 4
23
26
is_closed : true
24
27
creator_id : 5
29
32
id : 4
30
33
title : project on user2
31
34
owner_id : 2
35
+ repo_id : 0
32
36
is_closed : false
33
37
creator_id : 2
34
38
board_type : 1
Original file line number Diff line number Diff line change @@ -469,6 +469,8 @@ var migrations = []Migration{
469
469
NewMigration ("Add NeedApproval to actions tables" , v1_20 .AddNeedApprovalToActionRun ),
470
470
// v245 -> v246
471
471
NewMigration ("Rename Webhook org_id to owner_id" , v1_20 .RenameWebhookOrgToOwner ),
472
+ // v246 -> v247
473
+ NewMigration ("Add missed column owner_id for project table" , v1_20 .AddNewColumnForProject ),
472
474
}
473
475
474
476
// GetCurrentDBVersion returns the current db version
Original file line number Diff line number Diff line change
1
+ // Copyright 2023 The Gitea Authors. All rights reserved.
2
+ // SPDX-License-Identifier: MIT
3
+
4
+ package v1_20 //nolint
5
+
6
+ import (
7
+ "xorm.io/xorm"
8
+ )
9
+
10
+ func AddNewColumnForProject (x * xorm.Engine ) error {
11
+ type Project struct {
12
+ OwnerID int64 `xorm:"INDEX"`
13
+ }
14
+
15
+ return x .Sync (new (Project ))
16
+ }
You can’t perform that action at this time.
0 commit comments