mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-14 14:40:52 +00:00
A one-time background pass re-reads each connected account's Google Health sleep history so nights stored twice before the sleep fix collapse to their true total (new sleep_repaired_at marker, migration 0238; watermark-safe, enqueued once at boot per un-repaired connection). The sleep night read reports when two writers disagree about the same night — the served total is unchanged, the disagreement rides along as an annotation (sourceDiscrepancy on the night DTO) so clients can mark the number instead of silently picking a side. A GLP-1 medication whose weight has plateaued on the current dose says so next to the estimated drug level (efficacy tab + insights) — a factual note from the existing detector, association only, verb-guard covered. Google Health diagnostics: the sync log now separates a daily-totals read that returned nothing from one the importer could not parse (googleHealth.rollup.emptyResponse vs droppedAll), and the connection test's structure probe reports the raw response envelope key names when a rollup type parses to zero — a per-account naming drift becomes visible from one report.
5 lines
260 B
SQL
5 lines
260 B
SQL
-- One-shot Google Health sleep duplicate repair (post-v1.28.18 fix).
|
|
-- Null = repair pending; stamped once the boot-time full sleep re-read
|
|
-- completes for the connection.
|
|
ALTER TABLE "google_health_connections" ADD COLUMN "sleep_repaired_at" TIMESTAMP(3);
|