summaryrefslogtreecommitdiffstats
path: root/models/release.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/release.go
parent1a7fc53c98f06f79955d217f91c8a5553e5a27b3 (diff)
downloadgitea-84b7d29d34e0d51e0c67e2e35803e8e611da7965.tar.gz
gitea-84b7d29d34e0d51e0c67e2e35803e8e611da7965.zip
Create missing database indexes (#596)
Diffstat (limited to 'models/release.go')
-rw-r--r--models/release.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/models/release.go b/models/release.go
index 28ba6c1d68..67ef81e21c 100644
--- a/models/release.go
+++ b/models/release.go
@@ -23,11 +23,11 @@ import (
// Release represents a release of repository.
type Release struct {
ID int64 `xorm:"pk autoincr"`
- RepoID int64 `xorm:"index unique(n)"`
+ RepoID int64 `xorm:"INDEX UNIQUE(n)"`
Repo *Repository `xorm:"-"`
- PublisherID int64
- Publisher *User `xorm:"-"`
- TagName string `xorm:"index unique(n)"`
+ PublisherID int64 `xorm:"INDEX"`
+ Publisher *User `xorm:"-"`
+ TagName string `xorm:"INDEX UNIQUE(n)"`
LowerTagName string
Target string
Title string
@@ -39,7 +39,7 @@ type Release struct {
IsPrerelease bool
Created time.Time `xorm:"-"`
- CreatedUnix int64
+ CreatedUnix int64 `xorm:"INDEX"`
}
// BeforeInsert is invoked from XORM before inserting an object of this type.