From b0506ad28d5560aff4aa92f7812ad42375c3a579 Mon Sep 17 00:00:00 2001 From: thefosk Date: Mon, 19 Sep 2016 15:10:52 -0700 Subject: [PATCH] fix(oauth2) create Cassandra index on oauth2_authorization_codes(credential_id) --- kong/plugins/oauth2/migrations/cassandra.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kong/plugins/oauth2/migrations/cassandra.lua b/kong/plugins/oauth2/migrations/cassandra.lua index c857eed63e8b..5eecad8eac78 100644 --- a/kong/plugins/oauth2/migrations/cassandra.lua +++ b/kong/plugins/oauth2/migrations/cassandra.lua @@ -113,5 +113,11 @@ return { down = [[ ALTER TABLE oauth2_authorization_codes DROP credential_id; ]] + }, + { + name = "2016-09-19-oauth2_code_index", + up = [[ + CREATE INDEX IF NOT EXISTS ON oauth2_authorization_codes(credential_id); + ]] } }