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:
parent
d4bfcfb6f4
commit
75a390f03e
2 changed files with 39 additions and 2 deletions
7
db/migrate/20241017204250_add_accounts_indexes.rb
Normal file
7
db/migrate/20241017204250_add_accounts_indexes.rb
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue