summaryrefslogtreecommitdiffstats
path: root/models/issue.go
diff options
context:
space:
mode:
authorAndrey Nering <andrey.nering@gmail.com>2017-01-06 13:14:33 -0200
committerLunny Xiao <xiaolunwen@gmail.com>2017-01-06 23:14:33 +0800
commit84b7d29d34e0d51e0c67e2e35803e8e611da7965 (patch)
tree0f8a47ffac337f37fdf48f1b34c44b2ca269dd63 /models/issue.go
parent1a7fc53c98f06f79955d217f91c8a5553e5a27b3 (diff)
downloadgitea-84b7d29d34e0d51e0c67e2e35803e8e611da7965.tar.gz
gitea-84b7d29d34e0d51e0c67e2e35803e8e611da7965.zip
Create missing database indexes (#596)
Diffstat (limited to 'models/issue.go')
-rw-r--r--models/issue.go30
1 files changed, 15 insertions, 15 deletions
diff --git a/models/issue.go b/models/issue.go
index 315c91e159..b8f23d5948 100644
--- a/models/issue.go
+++ b/models/issue.go
@@ -34,29 +34,29 @@ type Issue struct {
RepoID int64 `xorm:"INDEX UNIQUE(repo_index)"`
Repo *Repository `xorm:"-"`
Index int64 `xorm:"UNIQUE(repo_index)"` // Index in one repository.
- PosterID int64
- Poster *User `xorm:"-"`
- Title string `xorm:"name"`
- Content string `xorm:"TEXT"`
- RenderedContent string `xorm:"-"`
- Labels []*Label `xorm:"-"`
- MilestoneID int64
- Milestone *Milestone `xorm:"-"`
+ PosterID int64 `xorm:"INDEX"`
+ Poster *User `xorm:"-"`
+ Title string `xorm:"name"`
+ Content string `xorm:"TEXT"`
+ RenderedContent string `xorm:"-"`
+ Labels []*Label `xorm:"-"`
+ MilestoneID int64 `xorm:"INDEX"`
+ Milestone *Milestone `xorm:"-"`
Priority int
- AssigneeID int64
- Assignee *User `xorm:"-"`
- IsClosed bool
+ AssigneeID int64 `xorm:"INDEX"`
+ Assignee *User `xorm:"-"`
+ IsClosed bool `xorm:"INDEX"`
IsRead bool `xorm:"-"`
- IsPull bool // Indicates whether is a pull request or not.
+ IsPull bool `xorm:"INDEX"` // Indicates whether is a pull request or not.
PullRequest *PullRequest `xorm:"-"`
NumComments int
Deadline time.Time `xorm:"-"`
- DeadlineUnix int64
+ DeadlineUnix int64 `xorm:"INDEX"`
Created time.Time `xorm:"-"`
- CreatedUnix int64
+ CreatedUnix int64 `xorm:"INDEX"`
Updated time.Time `xorm:"-"`
- UpdatedUnix int64
+ UpdatedUnix int64 `xorm:"INDEX"`
Attachments []*Attachment `xorm:"-"`
Comments []*Comment `xorm:"-"`