Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20230314094213_remove_foreign_keys_from_u2f_registrations_table.rb « post_migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d6185d6674d85088987eb7159326713f1c5cbd67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

class RemoveForeignKeysFromU2fRegistrationsTable < Gitlab::Database::Migration[2.1]
  disable_ddl_transaction!

  def up
    with_lock_retries do
      remove_foreign_key :u2f_registrations, :users
    end
  end

  def down
    add_concurrent_foreign_key :u2f_registrations, :users, column: :user_id
  end
end