diff options
author | Andrey Nering <andrey.nering@gmail.com> | 2017-01-06 13:14:33 -0200 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-01-06 23:14:33 +0800 |
commit | 84b7d29d34e0d51e0c67e2e35803e8e611da7965 (patch) | |
tree | 0f8a47ffac337f37fdf48f1b34c44b2ca269dd63 /models/repo.go | |
parent | 1a7fc53c98f06f79955d217f91c8a5553e5a27b3 (diff) | |
download | gitea-84b7d29d34e0d51e0c67e2e35803e8e611da7965.tar.gz gitea-84b7d29d34e0d51e0c67e2e35803e8e611da7965.zip |
Create missing database indexes (#596)
Diffstat (limited to 'models/repo.go')
-rw-r--r-- | models/repo.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/models/repo.go b/models/repo.go index 85807e3a4b..4acb0d736e 100644 --- a/models/repo.go +++ b/models/repo.go @@ -193,10 +193,10 @@ type Repository struct { NumOpenMilestones int `xorm:"-"` NumTags int `xorm:"-"` - IsPrivate bool - IsBare bool + IsPrivate bool `xorm:"INDEX"` + IsBare bool `xorm:"INDEX"` - IsMirror bool + IsMirror bool `xorm:"INDEX"` *Mirror `xorm:"-"` // Advanced settings @@ -211,14 +211,14 @@ type Repository struct { ExternalMetas map[string]string `xorm:"-"` EnablePulls bool `xorm:"NOT NULL DEFAULT true"` - IsFork bool `xorm:"NOT NULL DEFAULT false"` - ForkID int64 + IsFork bool `xorm:"INDEX NOT NULL DEFAULT false"` + ForkID int64 `xorm:"INDEX"` BaseRepo *Repository `xorm:"-"` Created time.Time `xorm:"-"` - CreatedUnix int64 + CreatedUnix int64 `xorm:"INDEX"` Updated time.Time `xorm:"-"` - UpdatedUnix int64 + UpdatedUnix int64 `xorm:"INDEX"` } // BeforeInsert is invoked from XORM before inserting an object of this type. |