mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
The W17b/c sleep-stage migration widened the measurement unique index to (user_id, type, measured_at, source, sleep_stage) with NULLs treated as not-distinct, so three same-instant APPLE_HEALTH weight rows now collide on insert. Derive a stable per-externalId minute offset and stagger the seeded `measuredAt` accordingly so the deletion-by-externalId contract is exercised without piggy- backing on dedup behaviour the route doesn't care about.