Data model, two-household test, backup (26.11.3) #4

Merged
kai merged 1 commits from claude/ap2-datenmodell into main 2026-11-06 20:09:46 +00:00
1 Commits
Author SHA1 Message Date
Kai BöhmandClaude Opus 5.5 da54f70071 Data model, two-household test, backup to /app/data (26.11.3)
ci / olares chart · sanity (pull_request) Successful in 3s
markt / eintrag (pull_request) Successful in 22s
ci / app · types + tests + build (pull_request) Successful in 2m47s
Migration 0003 adds the concept's tables: dishes with ingredients,
steps and translations, stores and aisles, rounds, wishes, slots,
shopping items, pantry staples, receipts and lines, ingredient aliases,
price points, ratings, kudos, helper points, achievements, plus global
canonical ingredients (readable by all, writable only in migrations).
Every household table carries household_id with FORCE RLS, and
references inside a household are paired foreign keys so a row can
never point at another household's data (E-0007). Roles follow the
concept: admin, member, child, guest; households.created_by marks who
set up (E-0008).

The two-household test seeds every table for two households and reads
each one against the other. lib/backup.ts writes a backup to
/app/data/sicherungen after changes (checked every five minutes, at
least every six hours, last 14 kept); an empty database offers it on
/einrichten for restore with the setup code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HUc2nv7rJVU2gp3Bgtha3q
2026-11-06 20:05:14 +00:00