discourse/db/migrate/20160215075528_add_unread_pm_index_to_notifications.rb
Sam dd6ebde824 FIX: Always ensure notifications are treated as read once clicked
UX: improve messaging so notifications list is far more stable
PERF: improve performance of notifcation lookup queries

- Add feature "SetTransientHeader" that allows shipping info to server
   in the next Ajax request
- remove local storage hack used for notifications
- amend lookupStale to return hydrated objects, move logic into store
- stop magically clearing various notifications (likes, invitee accepted, group_summary, granted badge)
2016-02-15 19:29:47 +11:00

6 lines
289 B
Ruby

class AddUnreadPmIndexToNotifications < ActiveRecord::Migration
def change
# create index idxtmp on notifications(user_id, id) where notification_type = 6 AND NOT read
add_index :notifications, [:user_id, :id], unique: true, where: 'notification_type = 6 AND NOT read'
end
end