File tree 3 files changed +19
-1
lines changed 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -246,7 +246,7 @@ type Comment struct {
246
246
NewTitle string
247
247
OldRef string
248
248
NewRef string
249
- DependentIssueID int64
249
+ DependentIssueID int64 `xorm:"index"` // This is used by issue_service.deleteIssue
250
250
DependentIssue * Issue `xorm:"-"`
251
251
252
252
CommitID int64
Original file line number Diff line number Diff line change @@ -536,6 +536,8 @@ var migrations = []Migration{
536
536
NewMigration ("Add RemoteAddress to mirrors" , v1_21 .AddRemoteAddressToMirrors ),
537
537
// v277 -> v278
538
538
NewMigration ("Add Index to issue_user.issue_id" , v1_21 .AddIndexToIssueUserIssueID ),
539
+ // v278 -> v279
540
+ NewMigration ("Add Index to comment.dependent_issue_id" , v1_21 .AddIndexToCommentDependentIssueID ),
539
541
}
540
542
541
543
// 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_21 //nolint
5
+
6
+ import (
7
+ "xorm.io/xorm"
8
+ )
9
+
10
+ func AddIndexToCommentDependentIssueID (x * xorm.Engine ) error {
11
+ type Comment struct {
12
+ DependentIssueID int64 `xorm:"index"`
13
+ }
14
+
15
+ return x .Sync (new (Comment ))
16
+ }
You can’t perform that action at this time.
0 commit comments