One-time data migrations to move into the new schema. Safe to re-run.
Make sure /users/{uid} docs have the new required fields (currentGymId, weightUnit, role).
muscleGroups, add groupId to entriesRenames /muscleGroups docs from numeric (222) to slug (chest, back-hz, etc.). Cascades to /exercises.groupId and adds groupId field on every entry by looking up its exerciseId. Idempotent.
time/source/legacyDate into sessionNotesPrepends [logged at HH:MM:SS] to sessionNotes, then removes the extra legacy fields. Idempotent.
userId: "prosk"/"connor" → Auth UID)For sessions where userId is still a role string, set it to the Firebase Auth UID and add userRole / userEmail / legacy: true. Doc IDs unchanged. dayNum/week stay null (AppSheet didn't track them).
exerciseId on entries (match by name)Looks at every entry across all sessions. If exerciseId is null, it tries to find a match in /exercises by name (normalized; word-order tolerant). Idempotent.
gymLogs → sessions + entriesReads from drprosk-personal/gymLogs and writes to gym-tracker-d11c3/sessions/{sid}/entries/*. Idempotent — re-running overwrites.