A platform for community discussion. Free, open, simple.
PERF: use delete_all to remove notifications and topic_users
Sam Saffron26b4dbde417c
diff --git a/app/models/user.rb b/app/models/user.rbindex f26ac53661f..0b11dfee0d7 100644--- a/app/models/user.rb+++ b/app/models/user.rb@@ -22,8 +22,8 @@ class User < ActiveRecord::Baseinclude HasDestroyedWebHookhas_many :posts- has_many :notifications, dependent: :destroy- has_many :topic_users, dependent: :destroy+ has_many :notifications, dependent: :delete_all+ has_many :topic_users, dependent: :delete_allhas_many :category_users, dependent: :destroyhas_many :tag_users, dependent: :destroyhas_many :user_api_keys, dependent: :destroy