Files
HealthLog/prisma/migrations/0195_biomarker_hidden/migration.sql
T
Marc-André Bombeck e097e57c84 feat(labs): add a hidden flag to the biomarker catalog
Add a `hidden` boolean to the Biomarker model (migration
0195_biomarker_hidden) so a marker the user no longer needs can be
soft-removed instead of deleted: it leaves the active catalog and the
lab-entry pickers but keeps its readings and canonical unit/range.

Thread `hidden` through the DTO, the update schema, the PUT handler
(field-by-field), and the list endpoint (visible markers first). Regen
the OpenAPI contract.
2026-06-27 12:48:48 +02:00

10 lines
565 B
SQL

-- v1.22.0 — Biomarker catalog: per-marker "hidden" flag.
--
-- A marker the user no longer needs is hidden rather than deleted: it leaves
-- the active catalog list and the lab-entry pickers, but its readings and its
-- canonical unit/reference-range definition survive (unhide restores it). A
-- plain additive boolean column with a server-side default; no existing row is
-- touched (every back-filled row defaults to visible). `IF NOT EXISTS` makes
-- the rerun safe.
ALTER TABLE "biomarkers" ADD COLUMN IF NOT EXISTS "hidden" BOOLEAN NOT NULL DEFAULT false;