mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
PERF: speed up counting of unread notifications
This commit is contained in:
parent
e6f73a1c80
commit
1eeed5fed2
1 changed files with 5 additions and 0 deletions
|
@ -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 a new issue