mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 01:16:22 +08:00
DEV: Remove stale ignored_columns from models.
This commit is contained in:
parent
2dcad9772f
commit
9f5c8644d0
|
@ -1,9 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Badge < ActiveRecord::Base
|
||||
# TODO: Drop in July 2021
|
||||
self.ignored_columns = %w{image}
|
||||
|
||||
include GlobalPath
|
||||
include HasSanitizableFields
|
||||
|
||||
|
|
|
@ -5,11 +5,6 @@ class Category < ActiveRecord::Base
|
|||
'none'
|
||||
]
|
||||
|
||||
# TODO(2020-11-18): remove
|
||||
self.ignored_columns = %w{
|
||||
suppress_from_latest
|
||||
}
|
||||
|
||||
include Searchable
|
||||
include Positionable
|
||||
include HasCustomFields
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
class DirectoryColumn < ActiveRecord::Base
|
||||
|
||||
# TODO(2021-06-18): Remove automatic column
|
||||
self.ignored_columns = ["automatic"]
|
||||
self.inheritance_column = nil
|
||||
|
||||
enum type: { automatic: 0, user_field: 1, plugin: 2 }, _scopes: false
|
||||
|
|
|
@ -35,9 +35,6 @@ class EmailToken < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
|
||||
# TODO(2022-01-01): Remove
|
||||
self.ignored_columns = %w{token}
|
||||
|
||||
def self.scopes
|
||||
@scopes ||= Enum.new(
|
||||
signup: 1,
|
||||
|
|
|
@ -10,9 +10,6 @@ class EmbeddableHost < ActiveRecord::Base
|
|||
self.host.sub!(/\/.*$/, '')
|
||||
end
|
||||
|
||||
# TODO(2021-07-23): Remove
|
||||
self.ignored_columns = ["path_whitelist"]
|
||||
|
||||
def self.record_for_url(uri)
|
||||
|
||||
if uri.is_a?(String)
|
||||
|
|
|
@ -8,12 +8,6 @@ class Invite < ActiveRecord::Base
|
|||
include RateLimiter::OnCreateRecord
|
||||
include Trashable
|
||||
|
||||
# TODO(2021-05-22): remove
|
||||
self.ignored_columns = %w{
|
||||
user_id
|
||||
redeemed_at
|
||||
}
|
||||
|
||||
BULK_INVITE_EMAIL_LIMIT = 200
|
||||
DOMAIN_REGEX = /\A(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)+([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])\z/
|
||||
|
||||
|
|
|
@ -10,11 +10,6 @@ class Post < ActiveRecord::Base
|
|||
include HasCustomFields
|
||||
include LimitedEdit
|
||||
|
||||
self.ignored_columns = [
|
||||
"avg_time", # TODO(2021-01-04): remove
|
||||
"image_url" # TODO(2021-06-01): remove
|
||||
]
|
||||
|
||||
cattr_accessor :plugin_permitted_create_params, :plugin_permitted_update_params
|
||||
self.plugin_permitted_create_params = {}
|
||||
self.plugin_permitted_update_params = {}
|
||||
|
|
|
@ -11,11 +11,6 @@ class Topic < ActiveRecord::Base
|
|||
include LimitedEdit
|
||||
extend Forwardable
|
||||
|
||||
self.ignored_columns = [
|
||||
"avg_time", # TODO(2021-01-04): remove
|
||||
"image_url" # TODO(2021-06-01): remove
|
||||
]
|
||||
|
||||
def_delegator :featured_users, :user_ids, :featured_user_ids
|
||||
def_delegator :featured_users, :choose, :feature_topic_users
|
||||
|
||||
|
|
|
@ -3,10 +3,6 @@
|
|||
class TopicTimer < ActiveRecord::Base
|
||||
MAX_DURATION_MINUTES = 20.years.to_i / 60
|
||||
|
||||
self.ignored_columns = [
|
||||
"duration" # TODO(2021-06-01): remove
|
||||
]
|
||||
|
||||
include Trashable
|
||||
|
||||
belongs_to :user
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class TopicUser < ActiveRecord::Base
|
||||
self.ignored_columns = [
|
||||
:highest_seen_post_number # Remove after 01 Jan 2022
|
||||
]
|
||||
|
||||
belongs_to :user
|
||||
belongs_to :topic
|
||||
|
||||
|
|
|
@ -3,10 +3,6 @@
|
|||
require "digest/sha1"
|
||||
|
||||
class Upload < ActiveRecord::Base
|
||||
self.ignored_columns = [
|
||||
"verified" # TODO(2020-12-10): remove
|
||||
]
|
||||
|
||||
include ActionView::Helpers::NumberHelper
|
||||
include HasUrl
|
||||
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class UserApiKey < ActiveRecord::Base
|
||||
self.ignored_columns = [
|
||||
"scopes" # TODO(2020-12-18): remove
|
||||
]
|
||||
|
||||
REVOKE_MATCHER = RouteMatcher.new(actions: "user_api_keys#revoke", methods: :post, params: [:id])
|
||||
|
||||
belongs_to :user
|
||||
|
|
|
@ -4,9 +4,6 @@ class UserStat < ActiveRecord::Base
|
|||
belongs_to :user
|
||||
after_save :trigger_badges
|
||||
|
||||
# TODO(2021-05-13): Remove
|
||||
self.ignored_columns = ["topic_reply_count"]
|
||||
|
||||
def self.ensure_consistency!(last_seen = 1.hour.ago)
|
||||
reset_bounce_scores
|
||||
update_distinct_badge_count
|
||||
|
|
Loading…
Reference in New Issue
Block a user