mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-10 05:12:14 +00:00
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.
10 lines
565 B
SQL
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;
|