aboutsummaryrefslogtreecommitdiffstats
path: root/models/repo_mirror.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/repo_mirror.go
parent1a7fc53c98f06f79955d217f91c8a5553e5a27b3 (diff)
downloadgitea-84b7d29d34e0d51e0c67e2e35803e8e611da7965.tar.gz
gitea-84b7d29d34e0d51e0c67e2e35803e8e611da7965.zip
Create missing database indexes (#596)
Diffstat (limited to 'models/repo_mirror.go')
-rw-r--r--models/repo_mirror.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/models/repo_mirror.go b/models/repo_mirror.go
index 2cedf69d70..abe70de1ab 100644
--- a/models/repo_mirror.go
+++ b/models/repo_mirror.go
@@ -24,16 +24,16 @@ var MirrorQueue = sync.NewUniqueQueue(setting.Repository.MirrorQueueLength)
// Mirror represents mirror information of a repository.
type Mirror struct {
- ID int64 `xorm:"pk autoincr"`
- RepoID int64
+ ID int64 `xorm:"pk autoincr"`
+ RepoID int64 `xorm:"INDEX"`
Repo *Repository `xorm:"-"`
Interval int // Hour.
EnablePrune bool `xorm:"NOT NULL DEFAULT true"`
Updated time.Time `xorm:"-"`
- UpdatedUnix int64
+ UpdatedUnix int64 `xorm:"INDEX"`
NextUpdate time.Time `xorm:"-"`
- NextUpdateUnix int64
+ NextUpdateUnix int64 `xorm:"INDEX"`
address string `xorm:"-"`
}