2019-12-05 19:07:48 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class AddStateToMergeTrains < ActiveRecord::Migration[5.2]
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
MERGE_TRAIN_STATUS_CREATED = 0 # Equivalent to MergeTrain.statuses[:created]
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
disable_ddl_transaction!
|
|
|
|
|
|
|
|
def up
|
2020-05-15 11:08:04 -04:00
|
|
|
add_column_with_default :merge_trains, :status, :integer, limit: 2, default: MERGE_TRAIN_STATUS_CREATED # rubocop:disable Migration/AddColumnWithDefault
|
2019-12-05 19:07:48 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
remove_column :merge_trains, :status
|
|
|
|
end
|
|
|
|
end
|