chore: add migration 0007 for amount_aud + exchange_rate_to_aud columns

This commit is contained in:
2026-03-08 19:16:51 +11:00
parent d1a0eedf03
commit 90d8db4abe
@@ -0,0 +1,7 @@
-- Add FX conversion support
ALTER TABLE statements ADD COLUMN IF NOT EXISTS exchange_rate_to_aud NUMERIC(10,6);
ALTER TABLE transactions ADD COLUMN IF NOT EXISTS amount_aud NUMERIC(12,2);
-- Backfill: all existing data is AUD
UPDATE transactions SET amount_aud = amount WHERE amount_aud IS NULL;
UPDATE statements SET exchange_rate_to_aud = 1.000000 WHERE exchange_rate_to_aud IS NULL;