Fix rebase commit SHA migration name

This already existed in EE with a different timestamp, so rename for CE and make
it idempotent.
This commit is contained in:
Sean McGivern 2018-01-05 18:10:28 +00:00
parent 3d162d192b
commit 9ca49f8896
2 changed files with 15 additions and 7 deletions

View File

@ -1,7 +0,0 @@
class AddRebaseCommitShaToMergeRequests < ActiveRecord::Migration
DOWNTIME = false
def change
add_column :merge_requests, :rebase_commit_sha, :string
end
end

View File

@ -0,0 +1,15 @@
class AddRebaseCommitShaToMergeRequestsCe < ActiveRecord::Migration
DOWNTIME = false
def up
unless column_exists?(:merge_requests, :rebase_commit_sha)
add_column :merge_requests, :rebase_commit_sha, :string
end
end
def down
if column_exists?(:merge_requests, :rebase_commit_sha)
remove_column :merge_requests, :rebase_commit_sha
end
end
end