1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-02 20:15:22 +02:00

Account indexes to address some performance issues

This commit is contained in:
Josh Pigford 2024-10-17 15:45:13 -05:00
parent d4bfcfb6f4
commit 75a390f03e
2 changed files with 39 additions and 2 deletions

View file

@ -0,0 +1,7 @@
class AddAccountsIndexes < ActiveRecord::Migration[7.2]
def change
add_index :accounts, [ :family_id, :accountable_type ]
add_index :accounts, [ :accountable_id, :accountable_type ]
add_index :accounts, [ :family_id, :id ]
end
end