Communicate known foreign key violations to the user.

This commit is contained in:
2026-09-27 21:57:59 +02:00
parent 7cdd9bd74d
commit a67c67bbbd
6 changed files with 248 additions and 15 deletions
@@ -3,8 +3,8 @@ CREATE TABLE recurring_transactions (
name TEXT NOT NULL,
amount_cents BIGINT NOT NULL CHECK (amount_cents >= 0),
direction TEXT NOT NULL CHECK (direction IN ('in', 'out')),
source_account_id UUID REFERENCES accounts (id),
destination_account_id UUID REFERENCES accounts (id),
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),