20171226094803_more_faster_index_on_notifications.rb 382 B

12345678910
  1. # frozen_string_literal: true
  2. class MoreFasterIndexOnNotifications < ActiveRecord::Migration[5.2]
  3. disable_ddl_transaction!
  4. def change
  5. add_index :notifications, [:account_id, :id], order: { id: :desc }, algorithm: :concurrently
  6. remove_index :notifications, [:id, :account_id, :activity_type], name: :index_notifications_on_id_and_account_id_and_activity_type
  7. end
  8. end