diff options
Diffstat (limited to 'db/post_migrate/20210823193234_remove_allow_editing_commit_messages_from_project_settings.rb')
-rw-r--r-- | db/post_migrate/20210823193234_remove_allow_editing_commit_messages_from_project_settings.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/db/post_migrate/20210823193234_remove_allow_editing_commit_messages_from_project_settings.rb b/db/post_migrate/20210823193234_remove_allow_editing_commit_messages_from_project_settings.rb new file mode 100644 index 00000000000..638361d0e83 --- /dev/null +++ b/db/post_migrate/20210823193234_remove_allow_editing_commit_messages_from_project_settings.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class RemoveAllowEditingCommitMessagesFromProjectSettings < ActiveRecord::Migration[6.1] + include Gitlab::Database::MigrationHelpers + + def up + return unless column_exists?(:project_settings, :allow_editing_commit_messages) + + with_lock_retries do + remove_column :project_settings, :allow_editing_commit_messages + end + end + + def down + with_lock_retries do + add_column :project_settings, :allow_editing_commit_messages, :boolean, default: false, null: false + end + end +end |