Added expenses.

This commit is contained in:
2026-09-20 21:52:49 +02:00
parent 15b8ae8f62
commit b9d18c4dd1
8 changed files with 226 additions and 1 deletions
@@ -0,0 +1,23 @@
CREATE TABLE recurring_expenses (
id UUID PRIMARY KEY DEFAULT gen_random_uuid (),
name TEXT NOT NULL,
amount_cents BIGINT NOT NULL,
starts_at TIMESTAMPTZ NOT NULL,
ends_at TIMESTAMPTZ,
recurrence_every INTEGER NOT NULL CHECK (recurrence_every > 0),
recurrence_unit TEXT NOT NULL CHECK (
recurrence_unit IN (
'day',
'week',
'month',
'year'
)
),
weekend_adjustment TEXT CHECK (
weekend_adjustment IS NULL
OR weekend_adjustment IN (
'previous_business_day',
'next_business_day'
)
)
);