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

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

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

  def up
    with_lock_retries do
      remove_foreign_key_if_exists(:clusters_applications_helm, column: :cluster_id)
    end
  end

  def down
    add_concurrent_foreign_key :clusters_applications_helm, :clusters,
      column: :cluster_id, on_delete: :cascade, name: 'fk_rails_3e2b1c06bc'
  end
end