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); + ]] } }