Commit 0c1bb1e6 authored by Jan Provaznik's avatar Jan Provaznik

Merge branch '336751_move_ignore_column_to_ce_model' into 'master'

Move ignore_column(s) from EE model to CE model

See merge request gitlab-org/gitlab!66738
parents fef014d9 b3ba765c
...@@ -5,6 +5,11 @@ class ApplicationSetting < ApplicationRecord ...@@ -5,6 +5,11 @@ class ApplicationSetting < ApplicationRecord
include CacheMarkdownField include CacheMarkdownField
include TokenAuthenticatable include TokenAuthenticatable
include ChronicDurationAttribute 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 INSTANCE_REVIEW_MIN_USERS = 50
GRAFANA_URL_ERROR_MESSAGE = 'Please check your Grafana URL setting in ' \ GRAFANA_URL_ERROR_MESSAGE = 'Please check your Grafana URL setting in ' \
......
...@@ -45,6 +45,9 @@ class Project < ApplicationRecord ...@@ -45,6 +45,9 @@ class Project < ApplicationRecord
BoardLimitExceeded = Class.new(StandardError) 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' STATISTICS_ATTRIBUTE = 'repositories_count'
UNKNOWN_IMPORT_URL = 'http://unknown.git' UNKNOWN_IMPORT_URL = 'http://unknown.git'
# Hashed Storage versions handle rolling out new storage to project and dependents models: # Hashed Storage versions handle rolling out new storage to project and dependents models:
......
...@@ -10,12 +10,6 @@ module EE ...@@ -10,12 +10,6 @@ module EE
extend ::Gitlab::Utils::Override extend ::Gitlab::Utils::Override
prepended do 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 EMAIL_ADDITIONAL_TEXT_CHARACTER_LIMIT = 10_000
DEFAULT_NUMBER_OF_DAYS_BEFORE_REMOVAL = 7 DEFAULT_NUMBER_OF_DAYS_BEFORE_REMOVAL = 7
MASK_PASSWORD = '*****' MASK_PASSWORD = '*****'
......
...@@ -10,7 +10,6 @@ module EE ...@@ -10,7 +10,6 @@ module EE
extend ::Gitlab::Utils::Override extend ::Gitlab::Utils::Override
extend ::Gitlab::Cache::RequestCache extend ::Gitlab::Cache::RequestCache
include ::Gitlab::Utils::StrongMemoize include ::Gitlab::Utils::StrongMemoize
include IgnorableColumns
GIT_LFS_DOWNLOAD_OPERATION = 'download' GIT_LFS_DOWNLOAD_OPERATION = 'download'
PUBLIC_COST_FACTOR_RELEASE_DAY = Date.new(2021, 7, 17).freeze PUBLIC_COST_FACTOR_RELEASE_DAY = Date.new(2021, 7, 17).freeze
...@@ -23,9 +22,6 @@ module EE ...@@ -23,9 +22,6 @@ module EE
include UsageStatistics include UsageStatistics
include ProjectSecurityScannersInformation 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_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 } 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