BigW Consortium Gitlab

20170506091344_add_foreign_key_to_pipeline_schedules.rb 339 Bytes
Newer Older
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