diff options
author | Valery Sizov <valery@gitlab.com> | 2017-11-04 15:20:27 +0300 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2017-11-04 15:20:27 +0300 |
commit | 3959460ce066d60226246c96ba98d20c7396ed08 (patch) | |
tree | 879e89d48fbbcd8e88961048508f277a6e8eca91 /db/migrate/20150827121444_add_fast_forward_option_to_project.rb | |
parent | 5d4f377bfd50cb1b2b1980f036b18c7b5d2b137f (diff) |
Put a condition to old migration that adds fast_forward column to MRs
Diffstat (limited to 'db/migrate/20150827121444_add_fast_forward_option_to_project.rb')
-rw-r--r-- | db/migrate/20150827121444_add_fast_forward_option_to_project.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/db/migrate/20150827121444_add_fast_forward_option_to_project.rb b/db/migrate/20150827121444_add_fast_forward_option_to_project.rb index 6f22641077d..35df121519e 100644 --- a/db/migrate/20150827121444_add_fast_forward_option_to_project.rb +++ b/db/migrate/20150827121444_add_fast_forward_option_to_project.rb @@ -8,7 +8,11 @@ class AddFastForwardOptionToProject < ActiveRecord::Migration disable_ddl_transaction! def up - add_column_with_default(:projects, :merge_requests_ff_only_enabled, :boolean, default: false) + # We put condition here because of a mistake we made a couple of years ago + # see https://gitlab.com/gitlab-org/gitlab-ce/issues/39382#note_45716103 + unless column_exists?(:projects, :merge_requests_ff_only_enabled) + add_column_with_default(:projects, :merge_requests_ff_only_enabled, :boolean, default: false) + end end def down |