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

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

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

  def up
    with_lock_retries do
      remove_foreign_key_if_exists(:serverless_domain_cluster, column: :creator_id)
    end
  end

  def down
    add_concurrent_foreign_key :serverless_domain_cluster, :users,
      column: :creator_id, on_delete: :nullify, name: 'fk_rails_fbdba67eb1'
  end
end