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/action.go | |
parent | 1a7fc53c98f06f79955d217f91c8a5553e5a27b3 (diff) | |
download | gitea-84b7d29d34e0d51e0c67e2e35803e8e611da7965.tar.gz gitea-84b7d29d34e0d51e0c67e2e35803e8e611da7965.zip |
Create missing database indexes (#596)
Diffstat (limited to 'models/action.go')
-rw-r--r-- | models/action.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/models/action.go b/models/action.go index 8b3d82b4d6..112e9ec7b9 100644 --- a/models/action.go +++ b/models/action.go @@ -71,19 +71,19 @@ func init() { // used in template render. type Action struct { ID int64 `xorm:"pk autoincr"` - UserID int64 // Receiver user id. + UserID int64 `xorm:"INDEX"` // Receiver user id. OpType ActionType - ActUserID int64 // Action user id. + ActUserID int64 `xorm:"INDEX"` // Action user id. ActUserName string // Action user name. ActAvatar string `xorm:"-"` - RepoID int64 + RepoID int64 `xorm:"INDEX"` RepoUserName string RepoName string RefName string - IsPrivate bool `xorm:"NOT NULL DEFAULT false"` + IsPrivate bool `xorm:"INDEX NOT NULL DEFAULT false"` Content string `xorm:"TEXT"` Created time.Time `xorm:"-"` - CreatedUnix int64 + CreatedUnix int64 `xorm:"INDEX"` } // BeforeInsert will be invoked by XORM before inserting a record |