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

20171006091000_add_name_foreign_key_to_ci_build_trace_sections.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 08422885a985540560f52638b50f06319e717148 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class AddNameForeignKeyToCiBuildTraceSections < ActiveRecord::Migration
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  disable_ddl_transaction!

  def up
    add_concurrent_foreign_key(:ci_build_trace_sections, :ci_build_trace_section_names, column: :section_name_id)
  end

  def down
    remove_foreign_key(:ci_build_trace_sections, column: :section_name_id)
  end
end