debian-mirror-gitlab/db/migrate/20171230123729_add_rebase_commit_sha_to_merge_requests_ce.rb

16 lines
386 B
Ruby
Raw Normal View History

2019-02-15 15:39:39 +05:30
class AddRebaseCommitShaToMergeRequestsCe < ActiveRecord::Migration[4.2]
2018-03-17 18:26:18 +05:30
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