Skip to content

Commit 2183f58

Browse files
committed
add index on comment
1 parent 09463d1 commit 2183f58

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

models/issue_comment.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ const (
9999

100100
// Comment represents a comment in commit and issue page.
101101
type Comment struct {
102-
ID int64 `xorm:"pk autoincr"`
103-
Type CommentType
104-
PosterID int64 `xorm:"INDEX"`
105-
Poster *User `xorm:"-"`
102+
ID int64 `xorm:"pk autoincr"`
103+
Type CommentType `xorm:"index"`
104+
PosterID int64 `xorm:"INDEX"`
105+
Poster *User `xorm:"-"`
106106
OriginalAuthor string
107107
OriginalAuthorID int64
108108
IssueID int64 `xorm:"INDEX"`
@@ -143,7 +143,7 @@ type Comment struct {
143143
ShowTag CommentTag `xorm:"-"`
144144

145145
Review *Review `xorm:"-"`
146-
ReviewID int64
146+
ReviewID int64 `xorm:"index"`
147147
Invalidated bool
148148
}
149149

0 commit comments

Comments
 (0)