mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 06:49:14 +08:00
Revert "FIX: Delete related search data when record has been deleted."
This reverts commit ecc799ab56
.
This commit does not fix anything because we've always been deleting
records in `Searchable`.
This commit is contained in:
parent
9eedc83e00
commit
cbe1dd8ec7
|
@ -47,8 +47,6 @@ class Category < ActiveRecord::Base
|
|||
|
||||
has_and_belongs_to_many :web_hooks
|
||||
|
||||
has_one :category_search_data, dependent: :delete
|
||||
|
||||
validates :user_id, presence: true
|
||||
|
||||
validates :name, if: Proc.new { |c| c.new_record? || c.will_save_change_to_name? },
|
||||
|
|
|
@ -52,7 +52,6 @@ class Post < ActiveRecord::Base
|
|||
has_many :revisions, -> { order(:number) }, foreign_key: :post_id, class_name: 'PostRevision'
|
||||
|
||||
has_many :user_actions, foreign_key: :target_post_id
|
||||
has_one :post_search_data, dependent: :delete
|
||||
|
||||
belongs_to :image_upload, class_name: "Upload"
|
||||
|
||||
|
|
|
@ -39,8 +39,6 @@ class Tag < ActiveRecord::Base
|
|||
belongs_to :target_tag, class_name: "Tag", optional: true
|
||||
has_many :synonyms, class_name: "Tag", foreign_key: "target_tag_id", dependent: :destroy
|
||||
|
||||
has_one :tag_search_data, dependent: :delete
|
||||
|
||||
after_save :index_search
|
||||
after_save :update_synonym_associations
|
||||
|
||||
|
|
|
@ -233,7 +233,7 @@ class Topic < ActiveRecord::Base
|
|||
|
||||
has_one :user_warning
|
||||
has_one :first_post, -> { where post_number: 1 }, class_name: 'Post'
|
||||
has_one :topic_search_data, dependent: :delete
|
||||
has_one :topic_search_data
|
||||
has_one :topic_embed, dependent: :destroy
|
||||
|
||||
belongs_to :image_upload, class_name: 'Upload'
|
||||
|
|
|
@ -48,7 +48,6 @@ class User < ActiveRecord::Base
|
|||
has_one :anonymous_user_master, class_name: 'AnonymousUser', dependent: :destroy
|
||||
has_one :anonymous_user_shadow, ->(record) { where(active: true) }, foreign_key: :master_user_id, class_name: 'AnonymousUser', dependent: :destroy
|
||||
has_one :invited_user, dependent: :destroy
|
||||
has_one :user_search_data, dependent: :delete
|
||||
|
||||
# delete all is faster but bypasses callbacks
|
||||
has_many :bookmarks, dependent: :delete_all
|
||||
|
|
Loading…
Reference in New Issue
Block a user