diff options
Diffstat (limited to 'db/migrate/20161209165216_create_doorkeeper_openid_connect_tables.rb')
-rw-r--r-- | db/migrate/20161209165216_create_doorkeeper_openid_connect_tables.rb | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/db/migrate/20161209165216_create_doorkeeper_openid_connect_tables.rb b/db/migrate/20161209165216_create_doorkeeper_openid_connect_tables.rb deleted file mode 100644 index e8ea9cf8fda..00000000000 --- a/db/migrate/20161209165216_create_doorkeeper_openid_connect_tables.rb +++ /dev/null @@ -1,37 +0,0 @@ -class CreateDoorkeeperOpenidConnectTables < ActiveRecord::Migration[4.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - create_table :oauth_openid_requests do |t| - t.integer :access_grant_id, null: false - t.string :nonce, null: false - end - - if Gitlab::Database.postgresql? - # add foreign key without validation to avoid downtime on PostgreSQL, - # also see db/post_migrate/20170209140523_validate_foreign_keys_on_oauth_openid_requests.rb - execute %q{ - ALTER TABLE "oauth_openid_requests" - ADD CONSTRAINT "fk_oauth_openid_requests_oauth_access_grants_access_grant_id" - FOREIGN KEY ("access_grant_id") - REFERENCES "oauth_access_grants" ("id") - NOT VALID; - } - else - execute %q{ - ALTER TABLE oauth_openid_requests - ADD CONSTRAINT fk_oauth_openid_requests_oauth_access_grants_access_grant_id - FOREIGN KEY (access_grant_id) - REFERENCES oauth_access_grants (id); - } - end - end - - def down - drop_table :oauth_openid_requests - end -end |