merge: Phase 5 (Rules Engine) + Phase 6 (Budget & Analytics)

Resolve additive conflicts in schema.prisma and hooks.ts — both models and all hooks retained.
This commit is contained in:
2026-03-08 17:09:57 +11:00
6 changed files with 626 additions and 3 deletions
@@ -0,0 +1,11 @@
CREATE TABLE IF NOT EXISTS budgets (
id SERIAL PRIMARY KEY,
owner_id INTEGER NOT NULL REFERENCES participants(id),
category TEXT NOT NULL,
month DATE NOT NULL,
amount_limit NUMERIC(10,2) NOT NULL,
created_at TIMESTAMPTZ DEFAULT NOW(),
updated_at TIMESTAMPTZ DEFAULT NOW(),
UNIQUE(owner_id, category, month)
);
CREATE INDEX IF NOT EXISTS idx_budgets_owner_month ON budgets(owner_id, month);