mirror of
https://github.com/we-promise/sure.git
synced 2026-04-07 14:31:25 +00:00
* Add orphan pruning tests for Simplefin importer and implement pruning logic - Introduced `SimplefinItem::ImporterOrphanPruneTest` to verify orphaned `SimplefinAccount` pruning scenarios. - Added logic in `SimplefinItem::Importer` to remove orphaned `SimplefinAccounts` when upstream account IDs change. - Ensured linked accounts via legacy FK or `AccountProvider` are preserved during pruning. - Updated sync stats to track pruned accounts. * Optimize SimplefinAccount query in importer to prevent N+1 issues - Added eager-loading of `account` and `account_provider` associations when retrieving orphaned `SimplefinAccounts`. --------- Co-authored-by: Josh Waldrep <joshua.waldrep5+github@gmail.com>