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

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

class AddFkToCiResourceGroupsProjectId < ActiveRecord::Migration[5.2]
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  disable_ddl_transaction!

  def up
    add_concurrent_foreign_key :ci_resource_groups, :projects, column: :project_id, on_delete: :cascade
  end

  def down
    remove_foreign_key_if_exists :ci_resource_groups, column: :project_id
  end
end