Permalink
Browse files

Merge pull request #1923 from Mashape/hotfix/oauth2-migration

  • Loading branch information...
2 parents 8e628cd + 369c88c commit 45f6b013efeff2d6720f3b1e4b915814ea3b691d @thefosk thefosk committed on GitHub Dec 23, 2016
Showing with 11 additions and 11 deletions.
  1. +11 −11 kong/plugins/oauth2/migrations/postgres.lua
@@ -82,7 +82,17 @@ return {
]]
},
{
- name = "2016-04-14-283949_serialize_redirect_uri",
+ name = "2016-07-15-oauth2_code_credential_id",
+ up = [[
+ DELETE FROM oauth2_authorization_codes;
+ ALTER TABLE oauth2_authorization_codes ADD COLUMN credential_id uuid REFERENCES oauth2_credentials (id) ON DELETE CASCADE;
+ ]],
+ down = [[
+ ALTER TABLE oauth2_authorization_codes DROP COLUMN credential_id;
+ ]]
+ },
+ {
+ name = "2016-12-22-283949_serialize_redirect_uri",
up = function(_, _, factory)
local schema = factory.oauth2_credentials.schema
schema.fields.redirect_uri.type = "string"
@@ -116,15 +126,5 @@ return {
end
end
end
- },
- {
- name = "2016-07-15-oauth2_code_credential_id",
- up = [[
- DELETE FROM oauth2_authorization_codes;
- ALTER TABLE oauth2_authorization_codes ADD COLUMN credential_id uuid REFERENCES oauth2_credentials (id) ON DELETE CASCADE;
- ]],
- down = [[
- ALTER TABLE oauth2_authorization_codes DROP COLUMN credential_id;
- ]]
}
}

0 comments on commit 45f6b01

Please sign in to comment.