mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 20:42:43 +00:00
The Workout uniqueness key is (userId, source, externalId). The same workout ingested from MANUAL plus the iOS HealthKit passthrough lands two rows because `source` differs — Postgres NULL-distinct semantics keep manual workouts unique among themselves, but the cross-source case has no canonical-picker layer yet. Measurements already solved the symmetric problem via the W8c canonical-source picker. Workouts need the same shape before the dashboard "recent workouts" tile can show one row per workout instead of one per source. Schema-only release today (W8d), and there is no iOS client yet, so the smell is latent — track it inline on the model so the v1.5 iOS sprint picks it up.