summaryrefslogtreecommitdiffstats
path: root/store/sql_webhook_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_webhook_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_webhook_store.go')
-rw-r--r--store/sql_webhook_store.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/store/sql_webhook_store.go b/store/sql_webhook_store.go
index 7c267064b..1e1740796 100644
--- a/store/sql_webhook_store.go
+++ b/store/sql_webhook_store.go
@@ -44,6 +44,14 @@ func (s SqlWebhookStore) CreateIndexesIfNotExists() {
s.CreateIndexIfNotExists("idx_incoming_webhook_user_id", "IncomingWebhooks", "UserId")
s.CreateIndexIfNotExists("idx_incoming_webhook_team_id", "IncomingWebhooks", "TeamId")
s.CreateIndexIfNotExists("idx_outgoing_webhook_team_id", "OutgoingWebhooks", "TeamId")
+
+ s.CreateIndexIfNotExists("idx_incoming_webhook_update_at", "IncomingWebhooks", "UpdateAt")
+ s.CreateIndexIfNotExists("idx_incoming_webhook_create_at", "IncomingWebhooks", "CreateAt")
+ s.CreateIndexIfNotExists("idx_incoming_webhook_delete_at", "IncomingWebhooks", "DeleteAt")
+
+ s.CreateIndexIfNotExists("idx_outgoing_webhook_update_at", "OutgoingWebhooks", "UpdateAt")
+ s.CreateIndexIfNotExists("idx_outgoing_webhook_create_at", "OutgoingWebhooks", "CreateAt")
+ s.CreateIndexIfNotExists("idx_outgoing_webhook_delete_at", "OutgoingWebhooks", "DeleteAt")
}
func (s SqlWebhookStore) SaveIncoming(webhook *model.IncomingWebhook) StoreChannel {