Copy rosters from offseasonRosters to rosters/{seasonId} collection
š Source Data
Source: offseasonRosters/current.teams Target: rosters/{seasonId}/{teamName}
This tool copies the current offseason rosters to the new centralized rosters collection organized by season.
š Preview
ā Sync Results
0 / 0 teams
š Backfill Auth IDs
What this does: Scans rosters/{seasonId}-{teamName} docs for players missing an authId, queries /users by linkedPlayer name, and writes the UID back into the roster entry.
Use when: A player signed up after rosters were synced and their auth account isn't reflected in the roster doc.
š Scan Results
Player
Team
Current Auth ID
Match Found
Action
🔧 Fix Roster Player IDs
What this does: Scans all roster docs for the selected season and detects players where the id field contains an Auth UID instead of a legacy snake_case ID (e.g. ralph_pombo). For each bad entry it looks up mergedFromProfile on the user doc to recover the correct legacy ID, then writes it back — moving the UID to authId.
Use when: Players were added via Auth UID rather than their legacy player ID, causing mismatches with batting orders and stats lookups.
🔎 ID Scan Results
Player
Team
Current id field
Current authId
Proposed Fix
Action
📟 Sync Jersey Numbers from User Profiles
What this does: Scans roster docs for the selected season and looks up each player's number field from their user profile doc. For players with an authId it fetches directly by UID; for legacy-only players it queries by mergedFromProfile. Shows a preview of all changes before writing.
Use when: Players have updated their jersey number in their profile and you want those numbers reflected in the roster doc (used by game tracker, roster management, etc.)