Skip to content

A platform for community discussion. Free, open, simple.

DEV: Remove old ignore columns (#37558)

Samd76702ec18e2
diff --git a/app/models/flag.rb b/app/models/flag.rb
index 6b7ae4017dd..58c90dc8927 100644
--- a/app/models/flag.rb
+++ b/app/models/flag.rb
@@ -1,9 +1,6 @@
# frozen_string_literal: true
class Flag < ActiveRecord::Base
- # TODO(2025-01-15): krisk remove
- self.ignored_columns = ["custom_type"]
-
DEFAULT_VALID_APPLIES_TO = %w[Post Topic]
MAX_SYSTEM_FLAG_ID = 1000
MAX_NAME_LENGTH = 200
diff --git a/app/models/translation_override.rb b/app/models/translation_override.rb
index df19163be5c..fe28e6ccc52 100644
--- a/app/models/translation_override.rb
+++ b/app/models/translation_override.rb
@@ -1,11 +1,6 @@
# frozen_string_literal: true
class TranslationOverride < ActiveRecord::Base
- # TODO: Remove once
- # 20240711123755_drop_compiled_js_from_translation_overrides has been
- # promoted to pre-deploy
- self.ignored_columns = %w[compiled_js]
-
# Allowlist i18n interpolation keys that can be included when customizing translations
ALLOWED_CUSTOM_INTERPOLATION_KEYS = {
%w[
diff --git a/plugins/chat/app/models/chat/channel.rb b/plugins/chat/app/models/chat/channel.rb
index 254b3ade160..3472d3ce64b 100644
--- a/plugins/chat/app/models/chat/channel.rb
+++ b/plugins/chat/app/models/chat/channel.rb
@@ -6,9 +6,6 @@ module Chat
include TypeMappable
include HasCustomFields
- # TODO (martin) Remove once we are using last_message instead,
- # should be around August 2023.
- self.ignored_columns = %w[last_message_sent_at icon_upload_id]
self.table_name = "chat_channels"
belongs_to :chatable, polymorphic: true
diff --git a/plugins/chat/app/models/chat/mention.rb b/plugins/chat/app/models/chat/mention.rb
index ef42f9dbbe5..52beac50028 100644
--- a/plugins/chat/app/models/chat/mention.rb
+++ b/plugins/chat/app/models/chat/mention.rb
@@ -3,7 +3,6 @@
module Chat
class Mention < ActiveRecord::Base
self.table_name = "chat_mentions"
- self.ignored_columns = %w[notification_id user_id]
belongs_to :chat_message, class_name: "Chat::Message"
has_many :mention_notifications,
diff --git a/plugins/chat/lib/chat/user_option_extension.rb b/plugins/chat/lib/chat/user_option_extension.rb
index 8e347c43f8d..212c01b52f2 100644
--- a/plugins/chat/lib/chat/user_option_extension.rb
+++ b/plugins/chat/lib/chat/user_option_extension.rb
@@ -2,14 +2,7 @@
module Chat
module UserOptionExtension
- # TODO: remove last_emailed_for_chat and chat_isolated in 2023
def self.prepended(base)
- if base.ignored_columns
- base.ignored_columns = base.ignored_columns + %i[last_emailed_for_chat chat_isolated]
- else
- base.ignored_columns = %i[last_emailed_for_chat chat_isolated]
- end
-
def base.chat_email_frequencies
@chat_email_frequencies ||= { never: 0, when_away: 1 }
end
diff --git a/plugins/discourse-ai/app/models/ai_persona.rb b/plugins/discourse-ai/app/models/ai_persona.rb
index 56a7da344dd..3bf6743028b 100644
--- a/plugins/discourse-ai/app/models/ai_persona.rb
+++ b/plugins/discourse-ai/app/models/ai_persona.rb
@@ -1,10 +1,8 @@
# frozen_string_literal: true
class AiPersona < ActiveRecord::Base
- # TODO remove this line 01-10-2025
- self.ignored_columns = %i[default_llm question_consolidator_llm]
- # TODO remove tool_details from ignored_columns 01-02-2026
- self.ignored_columns += %i[tool_details]
+ # TODO remove tool_details from ignored_columns 01-02-2027
+ self.ignored_columns = %i[tool_details]
# places a hard limit, so per site we cache a maximum of 500 classes
MAX_PERSONAS_PER_SITE = 500
diff --git a/plugins/discourse-ai/app/models/ai_summary.rb b/plugins/discourse-ai/app/models/ai_summary.rb
index f0aa5575151..4fe38c37300 100644
--- a/plugins/discourse-ai/app/models/ai_summary.rb
+++ b/plugins/discourse-ai/app/models/ai_summary.rb
@@ -1,9 +1,6 @@
# frozen_string_literal: true
class AiSummary < ActiveRecord::Base
- # TODO remove this line 01-3-2025
- self.ignored_columns = %i[content_range]
-
belongs_to :target, polymorphic: true
enum :summary_type, { complete: 0, gist: 1 }
diff --git a/plugins/discourse-ai/db/post_migrate/20260205065417_drop_tool_details_from_ai_personas.rb b/plugins/discourse-ai/db/post_migrate/20260205065417_drop_tool_details_from_ai_personas.rb
new file mode 100644
index 00000000000..6bf4fc1c74b
--- /dev/null
+++ b/plugins/discourse-ai/db/post_migrate/20260205065417_drop_tool_details_from_ai_personas.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+class DropToolDetailsFromAiPersonas < ActiveRecord::Migration[8.0]
+ def up
+ Migration::ColumnDropper.execute_drop(:ai_personas, %i[tool_details])
+ end
+
+ def down
+ raise ActiveRecord::IrreversibleMigration
+ end
+end
diff --git a/plugins/discourse-policy/app/models/post_policy.rb b/plugins/discourse-policy/app/models/post_policy.rb
index 8113330e9d8..ace80044834 100644
--- a/plugins/discourse-policy/app/models/post_policy.rb
+++ b/plugins/discourse-policy/app/models/post_policy.rb
@@ -1,10 +1,6 @@
# frozen_string_literal: true
class PostPolicy < ActiveRecord::Base
- self.ignored_columns = [
- "group_id", # TODO (sam) (2023-01-01) remove
- ]
-
belongs_to :post
has_many :post_policy_groups, dependent: :destroy