2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-08-31 00:06:56 -04:00
|
|
|
class AddUnreadNotificationsIndex < ActiveRecord::Migration[4.2]
|
2015-05-13 22:33:43 -04:00
|
|
|
def change
|
|
|
|
add_index :notifications,
|
|
|
|
%i[user_id notification_type],
|
|
|
|
where: "not read",
|
|
|
|
name: "idx_notifications_speedup_unread_count"
|
|
|
|
end
|
|
|
|
end
|