Commit 94f7724f authored by Andreas Brandl's avatar Andreas Brandl

Singular ignore_column method

parent 262a9c56
......@@ -36,7 +36,7 @@ module Ci
FORM_EDITABLE = %i[description tag_list active run_untagged locked access_level maximum_timeout_human_readable].freeze
ignore_columns :is_shared, remove_after: '2019-12-15', remove_with: '12.6'
ignore_column :is_shared, remove_after: '2019-12-15', remove_with: '12.6'
has_many :builds
has_many :runner_projects, inverse_of: :runner, dependent: :destroy # rubocop:disable Cop/ActiveRecordDependent
......
......@@ -12,5 +12,7 @@ module IgnorableColumns
self.ignored_columns += columns
end
alias_method :ignore_column, :ignore_columns
end
end
......@@ -11,7 +11,7 @@ class DeployKey < Key
scope :are_public, -> { where(public: true) }
scope :with_projects, -> { includes(deploy_keys_projects: { project: [:route, :namespace] }) }
ignore_columns :can_push, remove_after: '2019-12-15', remove_with: '12.6'
ignore_column :can_push, remove_after: '2019-12-15', remove_with: '12.6'
accepts_nested_attributes_for :deploy_keys_projects
......
......@@ -65,7 +65,7 @@ class Project < ApplicationRecord
# TODO: remove once GitLab 12.5 is released
# https://gitlab.com/gitlab-org/gitlab/issues/34638
ignore_columns :merge_requests_require_code_owner_approval, remove_after: '2019-12-01', remove_with: '12.6'
ignore_column :merge_requests_require_code_owner_approval, remove_after: '2019-12-01', remove_with: '12.6'
default_value_for :archived, false
default_value_for :resolve_outdated_diff_discussions, false
......
......@@ -6,7 +6,7 @@ module Operations
include IgnorableColumns
self.table_name = 'operations_feature_flags_clients'
ignore_columns :token, remove_after: '2019-12-15', remove_with: '12.6'
ignore_column :token, remove_after: '2019-12-15', remove_with: '12.6'
belongs_to :project
......
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