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

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

class RemoveProjectsCiBuildReportResultsProjectIdFk < Gitlab::Database::Migration[1.0]
  disable_ddl_transaction!

  def up
    with_lock_retries do
      remove_foreign_key_if_exists(:ci_build_report_results, :projects, name: "fk_rails_056d298d48")
    end
  end

  def down
    add_concurrent_foreign_key(:ci_build_report_results, :projects, name: "fk_rails_056d298d48", column: :project_id, target_column: :id, on_delete: "cascade")
  end
end