Permalink
Browse files

hotfix(oauth2) fixing postgres migration

  • Loading branch information...
1 parent 8e628cd commit 369c88c0a3f24a8cc4e035fecba9ea852e8d20e4 @thefosk thefosk committed 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 369c88c

Please sign in to comment.