mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
Single-fix release mirroring the Google Health natural-key rescue from v1.28.28 into the Fitbit sync. The measurements natural-key unique index (user, type, measured_at, source, sleep_stage — NULLS NOT DISTINCT, migration 0055) covers tombstoned rows, so a re-import carrying NEW externalIds for previously-removed rows collided on the natural key and skipDuplicates dropped the insert silently. Every planned create now gets a second chunked probe by natural key with no deletedAt filter; a match — live or tombstoned — is updated in place with the fresh value, the new externalId, and deletedAt: null. Probe failure notes the hard-failure ledger so the watermark holds and the next tick retries. No other code path touched.
954 KiB
954 KiB