Commit 3d171dc2 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Remove old ignore_column in AR models

Next models are affected:
* Project
* Namespace
* Issue
* Merge request
* CI Trigger
* CI Pipeline schedule
Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 283361f5
...@@ -4,11 +4,8 @@ module Ci ...@@ -4,11 +4,8 @@ module Ci
class PipelineSchedule < ApplicationRecord class PipelineSchedule < ApplicationRecord
extend Gitlab::Ci::Model extend Gitlab::Ci::Model
include Importable include Importable
include IgnorableColumn
include StripAttribute include StripAttribute
ignore_column :deleted_at
belongs_to :project belongs_to :project
belongs_to :owner, class_name: 'User' belongs_to :owner, class_name: 'User'
has_one :last_pipeline, -> { order(id: :desc) }, class_name: 'Ci::Pipeline' has_one :last_pipeline, -> { order(id: :desc) }, class_name: 'Ci::Pipeline'
......
...@@ -3,11 +3,8 @@ ...@@ -3,11 +3,8 @@
module Ci module Ci
class Trigger < ApplicationRecord class Trigger < ApplicationRecord
extend Gitlab::Ci::Model extend Gitlab::Ci::Model
include IgnorableColumn
include Presentable include Presentable
ignore_column :deleted_at
belongs_to :project belongs_to :project
belongs_to :owner, class_name: "User" belongs_to :owner, class_name: "User"
......
...@@ -13,11 +13,8 @@ class Issue < ApplicationRecord ...@@ -13,11 +13,8 @@ class Issue < ApplicationRecord
include RelativePositioning include RelativePositioning
include TimeTrackable include TimeTrackable
include ThrottledTouch include ThrottledTouch
include IgnorableColumn
include LabelEventable include LabelEventable
ignore_column :assignee_id, :branch_name, :deleted_at
DueDateStruct = Struct.new(:title, :name).freeze DueDateStruct = Struct.new(:title, :name).freeze
NoDueDate = DueDateStruct.new('No Due Date', '0').freeze NoDueDate = DueDateStruct.new('No Due Date', '0').freeze
AnyDueDate = DueDateStruct.new('Any Due Date', '').freeze AnyDueDate = DueDateStruct.new('Any Due Date', '').freeze
......
...@@ -7,7 +7,6 @@ class MergeRequest < ApplicationRecord ...@@ -7,7 +7,6 @@ class MergeRequest < ApplicationRecord
include Noteable include Noteable
include Referable include Referable
include Presentable include Presentable
include IgnorableColumn
include TimeTrackable include TimeTrackable
include ManualInverseAssociation include ManualInverseAssociation
include EachBatch include EachBatch
...@@ -24,10 +23,6 @@ class MergeRequest < ApplicationRecord ...@@ -24,10 +23,6 @@ class MergeRequest < ApplicationRecord
SORTING_PREFERENCE_FIELD = :merge_requests_sort SORTING_PREFERENCE_FIELD = :merge_requests_sort
ignore_column :locked_at,
:ref_fetched,
:deleted_at
belongs_to :target_project, class_name: "Project" belongs_to :target_project, class_name: "Project"
belongs_to :source_project, class_name: "Project" belongs_to :source_project, class_name: "Project"
belongs_to :merge_user, class_name: "User" belongs_to :merge_user, class_name: "User"
......
...@@ -8,13 +8,10 @@ class Namespace < ApplicationRecord ...@@ -8,13 +8,10 @@ class Namespace < ApplicationRecord
include AfterCommitQueue include AfterCommitQueue
include Storage::LegacyNamespace include Storage::LegacyNamespace
include Gitlab::SQL::Pattern include Gitlab::SQL::Pattern
include IgnorableColumn
include FeatureGate include FeatureGate
include FromUnion include FromUnion
include Gitlab::Utils::StrongMemoize include Gitlab::Utils::StrongMemoize
ignore_column :deleted_at
# Prevent users from creating unreasonably deep level of nesting. # Prevent users from creating unreasonably deep level of nesting.
# The number 20 was taken based on maximum nesting level of # The number 20 was taken based on maximum nesting level of
# Android repo (15) + some extra backup. # Android repo (15) + some extra backup.
......
...@@ -31,7 +31,6 @@ class Project < ApplicationRecord ...@@ -31,7 +31,6 @@ class Project < ApplicationRecord
include FeatureGate include FeatureGate
include OptionallySearch include OptionallySearch
include FromUnion include FromUnion
include IgnorableColumn
extend Gitlab::Cache::RequestCache extend Gitlab::Cache::RequestCache
extend Gitlab::ConfigHelper extend Gitlab::ConfigHelper
...@@ -56,8 +55,6 @@ class Project < ApplicationRecord ...@@ -56,8 +55,6 @@ class Project < ApplicationRecord
VALID_MIRROR_PORTS = [22, 80, 443].freeze VALID_MIRROR_PORTS = [22, 80, 443].freeze
VALID_MIRROR_PROTOCOLS = %w(http https ssh git).freeze VALID_MIRROR_PROTOCOLS = %w(http https ssh git).freeze
ignore_column :import_status, :import_jid, :import_error
cache_markdown_field :description, pipeline: :description cache_markdown_field :description, pipeline: :description
delegate :feature_available?, :builds_enabled?, :wiki_enabled?, delegate :feature_available?, :builds_enabled?, :wiki_enabled?,
......
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