From e9ec5238fc2918244c9d9c9f360449111ba43242 Mon Sep 17 00:00:00 2001 From: Gerhard Schlager Date: Fri, 18 Jan 2019 22:49:25 +0100 Subject: [PATCH] DEV: Remove ignored columns --- app/models/email_log.rb | 7 ------- app/models/post.rb | 3 --- app/models/theme.rb | 2 -- app/models/topic.rb | 3 --- app/models/user.rb | 4 ---- app/models/user_auth_token.rb | 3 --- app/models/user_option.rb | 3 --- app/models/user_profile.rb | 3 --- 8 files changed, 28 deletions(-) diff --git a/app/models/email_log.rb b/app/models/email_log.rb index 769436ea017..8ea894cc75c 100644 --- a/app/models/email_log.rb +++ b/app/models/email_log.rb @@ -1,13 +1,6 @@ require_dependency 'distributed_mutex' class EmailLog < ActiveRecord::Base - self.ignored_columns = %w{ - topic_id - reply_key - skipped - skipped_reason - } - CRITICAL_EMAIL_TYPES ||= Set.new %w{ account_created admin_login diff --git a/app/models/post.rb b/app/models/post.rb index cf8cdf514ad..00a4db52fa0 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -10,9 +10,6 @@ require 'archetype' require 'digest/sha1' class Post < ActiveRecord::Base - # TODO: Remove this after 19th Dec 2018 - self.ignored_columns = %w{vote_count} - include RateLimiter::OnCreateRecord include Trashable include Searchable diff --git a/app/models/theme.rb b/app/models/theme.rb index 6a7854ede14..411edc8fed4 100644 --- a/app/models/theme.rb +++ b/app/models/theme.rb @@ -7,8 +7,6 @@ require_dependency 'theme_translation_parser' require_dependency 'theme_translation_manager' class Theme < ActiveRecord::Base - # TODO: remove in 2019 - self.ignored_columns = ["key"] @cache = DistributedCache.new('theme') diff --git a/app/models/topic.rb b/app/models/topic.rb index b1baf0ecf0b..71ce6e1be7b 100644 --- a/app/models/topic.rb +++ b/app/models/topic.rb @@ -13,9 +13,6 @@ require_dependency 'topic_posters_summary' require_dependency 'topic_featured_users' class Topic < ActiveRecord::Base - # TODO remove 01-01-2019 - self.ignored_columns = ["percent_rank", "vote_count"] - class UserExists < StandardError; end include ActionView::Helpers::SanitizeHelper include RateLimiter::OnCreateRecord diff --git a/app/models/user.rb b/app/models/user.rb index 3659d6774bc..b07fc32f26f 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -21,10 +21,6 @@ class User < ActiveRecord::Base include SecondFactorManager include HasDestroyedWebHook - self.ignored_columns = %w{ - group_locked_trust_level - } - has_many :posts has_many :notifications, dependent: :destroy has_many :topic_users, dependent: :destroy diff --git a/app/models/user_auth_token.rb b/app/models/user_auth_token.rb index 0dcf75cbd30..d79bdac31ee 100644 --- a/app/models/user_auth_token.rb +++ b/app/models/user_auth_token.rb @@ -4,9 +4,6 @@ require 'digest/sha1' class UserAuthToken < ActiveRecord::Base belongs_to :user - # TODO 2019: remove this line - self.ignored_columns = ["legacy"] - ROTATE_TIME = 10.minutes # used when token did not arrive at client URGENT_ROTATE_TIME = 1.minute diff --git a/app/models/user_option.rb b/app/models/user_option.rb index aa86004975b..dafcec78b06 100644 --- a/app/models/user_option.rb +++ b/app/models/user_option.rb @@ -1,7 +1,4 @@ class UserOption < ActiveRecord::Base - # TODO: remove in 2019 - self.ignored_columns = ["theme_key"] - self.primary_key = :user_id belongs_to :user before_create :set_defaults diff --git a/app/models/user_profile.rb b/app/models/user_profile.rb index ffc62a263f3..4d36ab55655 100644 --- a/app/models/user_profile.rb +++ b/app/models/user_profile.rb @@ -1,9 +1,6 @@ require_dependency 'upload_creator' class UserProfile < ActiveRecord::Base - # TODO: remove this after Nov 1, 2018 - self.ignored_columns = %w{card_image_badge_id} - belongs_to :user, inverse_of: :user_profile validates :bio_raw, length: { maximum: 3000 }