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