Add database indexes to timestamp columns (#4314)

* Add database indexes to timestamp columns

* add indexes to session table
Этот коммит содержится в:
enahum
2016-10-24 17:05:27 -03:00
коммит произвёл Christopher Speller
родитель 510291e2e7
Коммит 5fdb8223fc
9 изменённых файлов: 31 добавлений и 0 удалений

Просмотреть файл

@@ -32,6 +32,9 @@ func NewSqlSessionStore(sqlStore *SqlStore) SessionStore {
func (me SqlSessionStore) CreateIndexesIfNotExists() {
me.CreateIndexIfNotExists("idx_sessions_user_id", "Sessions", "UserId")
me.CreateIndexIfNotExists("idx_sessions_token", "Sessions", "Token")
me.CreateIndexIfNotExists("idx_sessions_expires_at", "Sessions", "ExpiresAt")
me.CreateIndexIfNotExists("idx_sessions_create_at", "Sessions", "CreateAt")
me.CreateIndexIfNotExists("idx_sessions_last_activity_at", "Sessions", "LastActivityAt")
}
func (me SqlSessionStore) Save(session *model.Session) StoreChannel {