Commit b3ba765c authored by Corinna Wiesner's avatar Corinna Wiesner

Move ignore_column(s) from EE model to CE model

Prior to this change, models that exist in the CE and EE context and
used ignore_column(s) were incorrectly added to the EE model.
ignore_column(s) needs to be used in the CE model if the model exists in
CE and EE. If it only exists in EE, then the usage there is correct.

This will move the usages of ignore_column(s) to the CE model if a EE
model exists as well.
parent ef4d5c50
......@@ -5,6 +5,11 @@ class ApplicationSetting < ApplicationRecord
include CacheMarkdownField
include TokenAuthenticatable
include ChronicDurationAttribute
include IgnorableColumns
ignore_columns %i[elasticsearch_shards elasticsearch_replicas], remove_with: '14.4', remove_after: '2021-09-22'
ignore_column :seat_link_enabled, remove_with: '14.4', remove_after: '2021-09-22'
ignore_column :cloud_license_enabled, remove_with: '14.4', remove_after: '2021-09-22'
INSTANCE_REVIEW_MIN_USERS = 50
GRAFANA_URL_ERROR_MESSAGE = 'Please check your Grafana URL setting in ' \
......
......@@ -45,6 +45,9 @@ class Project < ApplicationRecord
BoardLimitExceeded = Class.new(StandardError)
ignore_columns :mirror_last_update_at, :mirror_last_successful_update_at, remove_after: '2021-09-22', remove_with: '14.4'
ignore_columns :pull_mirror_branch_prefix, remove_after: '2021-09-22', remove_with: '14.4'
STATISTICS_ATTRIBUTE = 'repositories_count'
UNKNOWN_IMPORT_URL = 'http://unknown.git'
# Hashed Storage versions handle rolling out new storage to project and dependents models:
......
......@@ -10,12 +10,6 @@ module EE
extend ::Gitlab::Utils::Override
prepended do
include IgnorableColumns
ignore_columns %i[elasticsearch_shards elasticsearch_replicas], remove_with: '14.1', remove_after: '2021-06-22'
ignore_column :seat_link_enabled, remove_with: '14.2', remove_after: '2021-07-22'
ignore_column :cloud_license_enabled, remove_with: '14.3', remove_after: '2021-08-22'
EMAIL_ADDITIONAL_TEXT_CHARACTER_LIMIT = 10_000
DEFAULT_NUMBER_OF_DAYS_BEFORE_REMOVAL = 7
MASK_PASSWORD = '*****'
......
......@@ -10,7 +10,6 @@ module EE
extend ::Gitlab::Utils::Override
extend ::Gitlab::Cache::RequestCache
include ::Gitlab::Utils::StrongMemoize
include IgnorableColumns
GIT_LFS_DOWNLOAD_OPERATION = 'download'
PUBLIC_COST_FACTOR_RELEASE_DAY = Date.new(2021, 7, 17).freeze
......@@ -23,9 +22,6 @@ module EE
include UsageStatistics
include ProjectSecurityScannersInformation
ignore_columns :mirror_last_update_at, :mirror_last_successful_update_at, remove_after: '2019-12-15', remove_with: '12.6'
ignore_columns :pull_mirror_branch_prefix, remove_after: '2021-02-22', remove_with: '14.0'
before_save :set_override_pull_mirror_available, unless: -> { ::Gitlab::CurrentSettings.mirror_available }
before_save :set_next_execution_timestamp_to_now, if: ->(project) { project.mirror? && project.mirror_changed? && project.import_state }
......
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