summaryrefslogtreecommitdiff
path: root/db/post_migrate
diff options
context:
space:
mode:
authorMarkus Koller <markus-koller@gmx.ch>2016-12-09 18:36:50 +0100
committerAlexis Reigel <mail@koffeinfrei.org>2017-03-07 14:54:35 +0100
commitc4982890489d254da2fe998aab30bf257767ed5e (patch)
tree0828e0cab70cabaceffcc0d588db32ac38ddf310 /db/post_migrate
parentfb4a486605e10692b5577f0700fbce38bebcc311 (diff)
downloadgitlab-ce-c4982890489d254da2fe998aab30bf257767ed5e.tar.gz
Implement OpenID Connect identity provider
Diffstat (limited to 'db/post_migrate')
-rw-r--r--db/post_migrate/20170209140523_validate_foreign_keys_on_oauth_openid_requests.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/db/post_migrate/20170209140523_validate_foreign_keys_on_oauth_openid_requests.rb b/db/post_migrate/20170209140523_validate_foreign_keys_on_oauth_openid_requests.rb
new file mode 100644
index 00000000000..e206f9af636
--- /dev/null
+++ b/db/post_migrate/20170209140523_validate_foreign_keys_on_oauth_openid_requests.rb
@@ -0,0 +1,20 @@
+class ValidateForeignKeysOnOauthOpenidRequests < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ if Gitlab::Database.postgresql?
+ execute %q{
+ ALTER TABLE "oauth_openid_requests"
+ VALIDATE CONSTRAINT "fk_oauth_openid_requests_oauth_access_grants_access_grant_id";
+ }
+ end
+ end
+
+ def down
+ # noop
+ end
+end