2023-07-12 09:47:08 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2023-03-27 16:09:10 +02:00
|
|
|
class MoreFasterIndexOnNotifications < ActiveRecord::Migration[5.2]
|
2018-01-04 19:38:29 +01:00
|
|
|
disable_ddl_transaction!
|
|
|
|
|
2017-12-26 17:56:31 +01:00
|
|
|
def change
|
|
|
|
add_index :notifications, [:account_id, :id], order: { id: :desc }, algorithm: :concurrently
|
2024-09-03 17:32:22 +02:00
|
|
|
remove_index :notifications, [:id, :account_id, :activity_type], name: :index_notifications_on_id_and_account_id_and_activity_type
|
2017-12-26 17:56:31 +01:00
|
|
|
end
|
|
|
|
end
|