summaryrefslogtreecommitdiffstats
path: root/models/issue_comment.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-08-05 22:29:40 +0800
committerLauris BH <lauris@nix.lv>2019-08-05 17:29:40 +0300
commit7b009626da2a8a2a46e0e205a3a7ce46cdf7ced2 (patch)
tree3c81393f4592e1b3735740fd4453cf735da00dcd /models/issue_comment.go
parent52feff5a5c76421fe90c8e6a62ec86eaaa4634f2 (diff)
downloadgitea-7b009626da2a8a2a46e0e205a3a7ce46cdf7ced2.tar.gz
gitea-7b009626da2a8a2a46e0e205a3a7ce46cdf7ced2.zip
Add SQL execution on log and indexes on table repository and comment (#7740)
* add index on comment * add SQL execution time on log and index owner_id on repository * add migration
Diffstat (limited to 'models/issue_comment.go')
-rw-r--r--models/issue_comment.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/models/issue_comment.go b/models/issue_comment.go
index 5e7ebc0cf3..32bb925e9b 100644
--- a/models/issue_comment.go
+++ b/models/issue_comment.go
@@ -99,10 +99,10 @@ const (
// Comment represents a comment in commit and issue page.
type Comment struct {
- ID int64 `xorm:"pk autoincr"`
- Type CommentType
- PosterID int64 `xorm:"INDEX"`
- Poster *User `xorm:"-"`
+ ID int64 `xorm:"pk autoincr"`
+ Type CommentType `xorm:"index"`
+ PosterID int64 `xorm:"INDEX"`
+ Poster *User `xorm:"-"`
OriginalAuthor string
OriginalAuthorID int64
IssueID int64 `xorm:"INDEX"`
@@ -143,7 +143,7 @@ type Comment struct {
ShowTag CommentTag `xorm:"-"`
Review *Review `xorm:"-"`
- ReviewID int64
+ ReviewID int64 `xorm:"index"`
Invalidated bool
}