Commit fbf8dd3e authored by Andreas Brandl's avatar Andreas Brandl

Add more column ignores

parent 112343b7
......@@ -14,6 +14,7 @@ class Issue < ApplicationRecord
include TimeTrackable
include ThrottledTouch
include LabelEventable
include IgnorableColumns
DueDateStruct = Struct.new(:title, :name).freeze
NoDueDate = DueDateStruct.new('No Due Date', '0').freeze
......@@ -68,8 +69,7 @@ class Issue < ApplicationRecord
scope :counts_by_state, -> { reorder(nil).group(:state_id).count }
# Only remove after 2019-12-22 and with %12.7
self.ignored_columns += %i[state]
ignore_column :state, remove_with: '12.7', remove_after: '2019-12-22'
after_commit :expire_etag_cache
after_save :ensure_metrics, unless: :imported?
......
......@@ -17,6 +17,7 @@ class MergeRequest < ApplicationRecord
include FromUnion
include DeprecatedAssignee
include ShaAttribute
include IgnorableColumns
sha_attribute :squash_commit_sha
......@@ -231,8 +232,7 @@ class MergeRequest < ApplicationRecord
with_state(:opened).where(auto_merge_enabled: true)
end
# Only remove after 2019-12-22 and with %12.7
self.ignored_columns += %i[state]
ignore_column :state, remove_with: '12.7', remove_after: '2019-12-22'
after_save :keep_around_commit
......
# frozen_string_literal: true
class ProjectCiCdSetting < ApplicationRecord
# TODO: remove once GitLab 12.7 is released
include IgnorableColumns
# https://gitlab.com/gitlab-org/gitlab/issues/36651
self.ignored_columns += %i[merge_trains_enabled]
ignore_column :merge_trains_enabled, remove_with: '12.7', remove_after: '2019-12-22'
belongs_to :project, inverse_of: :ci_cd_settings
# The version of the schema that first introduced this model/table.
......
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