Commit 7ec92703 authored by Kerri Miller's avatar Kerri Miller Committed by Douglas Barbosa Alexandre

Ignore deprecated column and remove references to it

parent cd2b19bf
...@@ -76,6 +76,10 @@ class Project < ApplicationRecord ...@@ -76,6 +76,10 @@ class Project < ApplicationRecord
delegate :no_import?, to: :import_state, allow_nil: true delegate :no_import?, to: :import_state, allow_nil: true
# TODO: remove once GitLab 12.5 is released
# https://gitlab.com/gitlab-org/gitlab/issues/34638
self.ignored_columns += %i[merge_requests_require_code_owner_approval]
default_value_for :archived, false default_value_for :archived, false
default_value_for :resolve_outdated_diff_discussions, false default_value_for :resolve_outdated_diff_discussions, false
default_value_for :container_registry_enabled, gitlab_config_features.container_registry default_value_for :container_registry_enabled, gitlab_config_features.container_registry
......
---
title: Ignore deprecated column and remove references to it
merge_request: 18911
author:
type: deprecated
...@@ -49,7 +49,6 @@ module EE ...@@ -49,7 +49,6 @@ module EE
merge_requests_author_approval merge_requests_author_approval
merge_requests_disable_committers_approval merge_requests_disable_committers_approval
require_password_to_approve require_password_to_approve
merge_requests_require_code_owner_approval
group_with_project_templates_id group_with_project_templates_id
] ]
......
...@@ -62,10 +62,6 @@ FactoryBot.modify do ...@@ -62,10 +62,6 @@ FactoryBot.modify do
last_repository_updated_at { rand(1.year).seconds.ago } last_repository_updated_at { rand(1.year).seconds.ago }
end end
trait :requiring_code_owner_approval do
merge_requests_require_code_owner_approval { true }
end
trait :jira_dvcs_cloud do trait :jira_dvcs_cloud do
before(:create) do |project| before(:create) do |project|
create(:project_feature_usage, :dvcs_cloud, project: project) create(:project_feature_usage, :dvcs_cloud, project: project)
......
...@@ -110,8 +110,6 @@ describe 'Merge request > User sees approval widget', :js do ...@@ -110,8 +110,6 @@ describe 'Merge request > User sees approval widget', :js do
before do before do
stub_licensed_features(code_owner_approval_required: true, multiple_approval_rules: true) stub_licensed_features(code_owner_approval_required: true, multiple_approval_rules: true)
project.update!(merge_requests_require_code_owner_approval: true)
allow(ProtectedBranch) allow(ProtectedBranch)
.to receive(:branch_requires_code_owner_approval?).and_return(true) .to receive(:branch_requires_code_owner_approval?).and_return(true)
end end
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
"pages_https_only":false, "pages_https_only":false,
"external_webhook_token":null, "external_webhook_token":null,
"merge_requests_author_approval":null, "merge_requests_author_approval":null,
"merge_requests_require_code_owner_approval":null,
"merge_requests_disable_committers_approval":null, "merge_requests_disable_committers_approval":null,
"require_password_to_approve":null, "require_password_to_approve":null,
"labels":[ "labels":[
......
...@@ -80,7 +80,7 @@ describe Gitlab::UsageData do ...@@ -80,7 +80,7 @@ describe Gitlab::UsageData do
context 'for create' do context 'for create' do
it 'includes accurate usage_activity_by_stage data' do it 'includes accurate usage_activity_by_stage data' do
user = create(:user) user = create(:user)
project = create(:project, :repository_private, :requiring_code_owner_approval, :github_imported, project = create(:project, :repository_private, :github_imported,
:test_repo, :remote_mirror, creator: user) :test_repo, :remote_mirror, creator: user)
create(:deploy_key, user: user) create(:deploy_key, user: user)
create(:key, user: user) create(:key, user: user)
......
...@@ -19,7 +19,7 @@ describe Projects::MergeRequestsController do ...@@ -19,7 +19,7 @@ describe Projects::MergeRequestsController do
context 'when the project requires code owner approval' do context 'when the project requires code owner approval' do
before do before do
stub_licensed_features(code_owners: true, code_owner_approval_required: true) stub_licensed_features(code_owners: true, code_owner_approval_required: true)
project.update!(merge_requests_require_code_owner_approval: true)
get_edit # Warm the cache get_edit # Warm the cache
end end
......
...@@ -537,7 +537,6 @@ Project: ...@@ -537,7 +537,6 @@ Project:
- external_webhook_token - external_webhook_token
- pages_https_only - pages_https_only
- merge_requests_disable_committers_approval - merge_requests_disable_committers_approval
- merge_requests_require_code_owner_approval
- require_password_to_approve - require_password_to_approve
ProjectTracingSetting: ProjectTracingSetting:
- external_url - external_url
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment