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

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

  DOWNTIME = false

  disable_ddl_transaction!

  def up
    add_concurrent_foreign_key :ci_pipeline_schedules, :projects, column: :project_id
  end

  def down
    remove_foreign_key :ci_pipeline_schedules, :projects
  end
end