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

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

class AddKeysRelationToSshSignatures < Gitlab::Database::Migration[2.0]
  disable_ddl_transaction!

  def up
    add_concurrent_foreign_key :ssh_signatures, :keys, column: :key_id, on_delete: :cascade
  end

  def down
    with_lock_retries do
      remove_foreign_key :ssh_signatures, column: :key_id
    end
  end
end