Backfill memo on re-sync and fix transactions table name in migration
Update duplicate handling during bank sync to populate the memo field on existing transactions when it's empty. Fix raw SQL table name from quoted "Transactions" to lowercase "transactions" matching the actual PostgreSQL schema. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -462,6 +462,16 @@ public class BankSyncService : IBankSyncService
|
||||
|
||||
if (duplicate != null)
|
||||
{
|
||||
// Update memo if the existing transaction has no memo
|
||||
if (!string.IsNullOrEmpty(parsed.Memo))
|
||||
{
|
||||
var existing = await _db.Transactions.FindAsync(duplicate.ExistingTransactionId);
|
||||
if (existing != null && string.IsNullOrEmpty(existing.Memo))
|
||||
{
|
||||
existing.Memo = parsed.Memo;
|
||||
}
|
||||
}
|
||||
|
||||
skipped++;
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user