mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-11 22:02:16 +00:00
Largest feature delta in the v1.4.x line. Insights expands into seven dedicated metric sub-pages; GLP-1 medication tracking lands end-to-end (drug-level chart with Research Mode acknowledgment, EMA titration ladder, cadence + compliance, side-effect taxonomy, pen/vial inventory); cross-source priority becomes a two-axis resolver; per-user timezone threads through ten analytics surfaces; Withings activity + sleep v2 sync; onboarding rebuilt as a nested-route wizard; Personal Records ship end-to-end; Health Score provenance accordion; Coach runs native first-party prompts across six locales with a 1800-assertion refusal-probe matrix; OpenAPI drift gate hard-fails; multi-arch GHCR image. Migrations 0043 through 0060 are additive and forward-only. PROMPT_VERSION 4.24.0 → 4.25.0 with GROUND RULE 9 (refuses dose recommendations) and GROUND RULE 15 (refuses drug-level estimates with MDR + MDCG 2021-24 cites). See CHANGELOG.md for the full per-section delta.
25 lines
1.2 KiB
SQL
25 lines
1.2 KiB
SQL
-- v1.4.25 W4e — medication_schedules @map to snake_case (cosmetic +
|
|
-- convention).
|
|
--
|
|
-- Prior to this migration `medication_schedules.windowStart` and
|
|
-- `medication_schedules.windowEnd` were the only columns on the model
|
|
-- that still used the camelCase identifier from the original
|
|
-- 0001_init.sql — every other column on the table (medication_id,
|
|
-- days_of_week) already follows the snake_case convention enforced
|
|
-- everywhere else in the schema. The drift was harmless (Prisma's
|
|
-- generated client uses the TypeScript-side `windowStart` /
|
|
-- `windowEnd` names regardless of the SQL identifier), but the
|
|
-- inconsistency tripped reviewers and made `grep window_start
|
|
-- prisma/migrations/` return zero rows.
|
|
--
|
|
-- The rename is purely a rename — the data does not move, no indexes
|
|
-- change, no foreign keys are affected. We use IF EXISTS so a
|
|
-- replayed migration on a fresh-from-schema DB (Prisma's `db push`
|
|
-- against a brand-new local) doesn't blow up trying to rename a
|
|
-- column that the schema-pushed shape already named snake_case.
|
|
--
|
|
-- Forward-only; no DOWN migration.
|
|
|
|
ALTER TABLE "medication_schedules" RENAME COLUMN "windowStart" TO "window_start";
|
|
ALTER TABLE "medication_schedules" RENAME COLUMN "windowEnd" TO "window_end";
|