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

20171006090010_add_build_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: d279463eb4bc78284884d21f7c6bcacede6f4421 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class AddBuildForeignKeyToCiBuildTraceSections < ActiveRecord::Migration
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  disable_ddl_transaction!

  def up
    add_concurrent_foreign_key(:ci_build_trace_sections, :ci_builds, column: :build_id)
  end

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