summaryrefslogtreecommitdiffstats
path: root/store/sql_user_store.go
diff options
context:
space:
mode:
authorenahum <nahumhbl@gmail.com>2016-10-24 17:05:27 -0300
committerChristopher Speller <crspeller@gmail.com>2016-10-24 16:05:27 -0400
commit5fdb8223fc23a12945c00a66edbfc6ef299320f9 (patch)
tree8876e10dfd8f5d6e1db4a1a918f5b676f1631d02 /store/sql_user_store.go
parent510291e2e70f5fecd460afe95e33d310c2f98e3f (diff)
downloadchat-5fdb8223fc23a12945c00a66edbfc6ef299320f9.tar.gz
chat-5fdb8223fc23a12945c00a66edbfc6ef299320f9.tar.bz2
chat-5fdb8223fc23a12945c00a66edbfc6ef299320f9.zip
Add database indexes to timestamp columns (#4314)
* Add database indexes to timestamp columns * add indexes to session table
Diffstat (limited to 'store/sql_user_store.go')
-rw-r--r--store/sql_user_store.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/store/sql_user_store.go b/store/sql_user_store.go
index 7904bdbfe..c1fb9b28d 100644
--- a/store/sql_user_store.go
+++ b/store/sql_user_store.go
@@ -55,6 +55,9 @@ func NewSqlUserStore(sqlStore *SqlStore) UserStore {
func (us SqlUserStore) CreateIndexesIfNotExists() {
us.CreateIndexIfNotExists("idx_users_email", "Users", "Email")
+ us.CreateIndexIfNotExists("idx_users_update_at", "Users", "UpdateAt")
+ us.CreateIndexIfNotExists("idx_users_create_at", "Users", "CreateAt")
+ us.CreateIndexIfNotExists("idx_users_delete_at", "Users", "DeleteAt")
us.CreateFullTextIndexIfNotExists("idx_users_username_txt", "Users", USER_SEARCH_TYPE_USERNAME)
us.CreateFullTextIndexIfNotExists("idx_users_all_names_txt", "Users", USER_SEARCH_TYPE_ALL)