DEV: Remove ignored columns

DEV: Remove ignored columns

diff --git a/app/models/email_log.rb b/app/models/email_log.rb
index 769436e..8ea894c 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 cf8cdf5..00a4db5 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 6a7854e..411edc8 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 b1baf0e..71ce6e1 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 3659d67..b07fc32 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 0dcf75c..d79bdac 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 aa86004..dafcec7 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 ffc62a2..4d36ab5 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 }

GitHub sha: e9ec5238

can you link some context to this please ?

There’s nothing I can link to. :thinking:

We add ignored_columns when we drop or rename a column to make sure that nothing blows up during deployments. They can be removed after some time. This commit simply does that for all columns that were dropped many months ago.

2 Likes