Refactored src and dst account to just account in preparation for a "counter party", instead of a full account.

This commit is contained in:
2026-10-03 20:33:13 +02:00
parent 221c38d364
commit 896b192c01
29 changed files with 535 additions and 422 deletions
@@ -1,10 +1,9 @@
CREATE TABLE recurring_transactions (
id UUID PRIMARY KEY DEFAULT gen_random_uuid (),
name TEXT NOT NULL,
account_id UUID NOT NULL CONSTRAINT fk_recurring_transactions_account REFERENCES accounts (id),
amount_cents BIGINT NOT NULL CHECK (amount_cents >= 0),
direction TEXT NOT NULL CHECK (direction IN ('in', 'out')),
source_account_id UUID CONSTRAINT fk_recurring_transactions_source_account REFERENCES accounts (id),
destination_account_id UUID CONSTRAINT fk_recurring_transactions_destination_account REFERENCES accounts (id),
starts_at TIMESTAMPTZ NOT NULL,
ends_at TIMESTAMPTZ,
recurrence_every INTEGER NOT NULL CHECK (recurrence_every > 0),