mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-10 13:22:14 +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.
23 lines
1.0 KiB
SQL
23 lines
1.0 KiB
SQL
-- v1.4.25 W7b — MoodEntry.tz column (proposal §7 Decision A).
|
|
--
|
|
-- HealthLog historically wrote `MoodEntry.date` (YYYY-MM-DD) under
|
|
-- the implicit Europe/Berlin assumption. Per-user timezone (Option B,
|
|
-- feature `feature-user-timezone.md`) makes that assumption wrong for
|
|
-- non-Berlin users — a 23:50 NZST reading would bucket into the
|
|
-- Berlin day, one day earlier than the user's own "today".
|
|
--
|
|
-- The fix is per-row tz attribution:
|
|
--
|
|
-- - New rows: writer captures `User.timezone` at write time, stores
|
|
-- it on the row, and computes `date` using that zone.
|
|
-- - Legacy rows: `tz IS NULL` is interpreted as "Europe/Berlin"
|
|
-- read-side. The historical bucketing stays consistent with the
|
|
-- numbers users have already seen.
|
|
--
|
|
-- Forward-only, additive, idempotent. No backfill is required because
|
|
-- the read-path treats `tz IS NULL` as Europe/Berlin (the value those
|
|
-- rows would carry if backfilled). Rollback is a manual DROP COLUMN.
|
|
|
|
ALTER TABLE "mood_entries"
|
|
ADD COLUMN IF NOT EXISTS "tz" VARCHAR(64);
|