mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
PERF: speed up counting of unread notifications
This commit is contained in:
parent
e6f73a1c80
commit
1eeed5fed2
@ -0,0 +1,5 @@
|
|||||||
|
class AddUnreadNotificationsIndex < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_index :notifications, [:user_id, :notification_type], where: 'not read', name: 'idx_notifications_speedup_unread_count'
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user