提交 f336133e 编写于 作者: S Stan Hu

Merge branch 'fix_migration_that_adds_ff_merge_field' into 'master'

Fix a migration that adds merge_requests_ff_only_enabled column to MR table

Closes #39382 and #39357

See merge request gitlab-org/gitlab-ce!15195
---
title: Fix a migration that adds merge_requests_ff_only_enabled column to MR table
merge_request:
author:
type: fixed
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册