gitlab-org--gitlab-foss/db/migrate/20161223034433_add_estimate_to_issuables_ce.rb
Rémy Coutable 2bf5fe5ede Rename duplicate migrations and skip them if table/columns are already present
The time tracking feature was backported from EE to CE, thus the CE
migrations should be uniquely named and should skip the actual migration
content if the table/columns already exist (that means that the EE
migrations were already performed).

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-01-19 21:02:45 +00:00

15 lines
383 B
Ruby

class AddEstimateToIssuablesCe < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def change
unless column_exists?(:issues, :time_estimate)
add_column :issues, :time_estimate, :integer
end
unless column_exists?(:merge_requests, :time_estimate)
add_column :merge_requests, :time_estimate, :integer
end
end
end