mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
The wipe deleted thirteen tables against a schema that carries more than eighty user-scoped ones. Mental-health assessments, lab results, the menstrual record, allergies, family history, the document vault, every AI conversation and live clinician share links all survived a confirmation that promised to permanently delete all health data. So did MeasurementRollup, the per-day reconstruction of the measurements the same transaction had just removed. The list now lives in src/lib/data-wipe/wipe-plan.ts next to its own exemption list, and a structural guard enumerates schema.prisma and fails when a model belongs to neither. Adding a model can no longer widen the set of things that survive a wipe by default. The same guard covers the User row's own columns, which had drifted the same way. The boundary is explicit: everything the account owns goes, except what is needed to sign in again. The confirmation and the toast say so before the person types the confirmation rather than after. Checkup reminders and allergies promised permanence over a soft delete with no restore path; both now hard-delete, so the dialog is true. The lab biomarker dialog was checked and is already accurate — it maps to the hard-deleting /api/biomarkers/[id] route, not to the soft-deleting lab result route.