diff options
author | Robert Speicher <rspeicher@gmail.com> | 2018-01-05 23:10:40 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2018-01-05 23:10:40 +0300 |
commit | 1572902586b4e7538d6c826b8ba314f629b445ca (patch) | |
tree | 35fdfe5d8b6e711fd57402a9cf1788c314bed25d /db | |
parent | 9ca49f8896f217a9bc7afa994faee933e78a2941 (diff) |
Add the EE `rebase_commit_sha` migration back in its original location
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20160621123729_add_rebase_commit_sha_to_merge_requests.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/db/migrate/20160621123729_add_rebase_commit_sha_to_merge_requests.rb b/db/migrate/20160621123729_add_rebase_commit_sha_to_merge_requests.rb new file mode 100644 index 00000000000..1222dc640a8 --- /dev/null +++ b/db/migrate/20160621123729_add_rebase_commit_sha_to_merge_requests.rb @@ -0,0 +1,22 @@ +# This migration is a duplicate of 20171230123729_add_rebase_commit_sha_to_merge_requests_ce.rb +# +# We backported this feature from EE using the same migration, but with a new +# timestamp, which caused an error when the backport was then to be merged back +# into EE. +# +# See discussion at https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/3932 +class AddRebaseCommitShaToMergeRequests < 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 |