2019-06-11 09:34:02 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class AddTargetProjectIdToMergeTrains < ActiveRecord::Migration[5.1]
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
def change
|
2019-09-13 18:06:03 +00:00
|
|
|
# rubocop:disable Rails/NotNullColumn, Migration/AddReference
|
2019-06-11 09:34:02 +00:00
|
|
|
add_reference :merge_trains, :target_project, null: false, index: true, foreign_key: { on_delete: :cascade, to_table: :projects }, type: :integer
|
|
|
|
add_column :merge_trains, :target_branch, :text, null: false
|
2019-09-13 18:06:03 +00:00
|
|
|
# rubocop:enable Rails/NotNullColumn, Migration/AddReference
|
2019-06-11 09:34:02 +00:00
|
|
|
end
|
|
|
|
end
|