mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-30 10:58:31 -05:00
7 lines
289 B
Ruby
7 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
|