๐ฅ User Management
Combine duplicate player records and re-aggregate stats
๐ Admin Tool-
Total Records
-
Auth Users ๐
-
Linked (users coll)
-
Legacy Profiles
-
Migrated
-
โ ๏ธ Issues
โน๏ธ How to Combine Player Records (e.g., Joe/Joseph)
- Search for player name variants (e.g., "Joe Smith" and "Joseph Smith")
- Select the records to merge as Source (data moves FROM these)
- Select ONE record as the Target (data moves TO this)
- Preview shows actual
playerStatsandpitchingStatsdata - Execute merge moves all season/game docs and deletes source docs
- Run the Aggregator afterward to rebuild career totals!
โ ๏ธ This tool merges at the source level:
playerStats/{source}/seasons/*โplayerStats/{target}/seasons/*playerStats/{source}/games/*โplayerStats/{target}/games/*pitchingStatssubcollections are also moved- Source documents are deleted after copying
aggregatedPlayerStats/{source}is marked as migrated
๐ Find Player Records
๐ Direct playerStats Lookup (for records not in aggregatedPlayerStats)
โก Merge Preview
๐ฅ Source Records (will be merged)
โ
๐ค Target Record (receives all stats)
๐ Combined Career Stats Preview
๐
Seasons to Merge
| Season | Team | G | AB | H | R | AVG | Source |
|---|
๐ Profile Setup Status
Track which authenticated users have completed the profile setup guide.
-
Total Auth Users
-
Setup Complete
-
Partial Setup
-
Not Started
-
Has FCM Token
-
In Directory
-
Active (30 days)
-
Stale (60+ days)
| User | 1๏ธโฃ | 2๏ธโฃ | 3๏ธโฃ | Role | Joined | Last Visit |
|---|---|---|---|---|---|---|
| Loading user data... | ||||||
๐ง Repair Orphaned Stats (Auth UID โ Legacy ID)
โ ๏ธ What this does: Finds
playerStats documents stored under a Firebase auth UID
(caused by a merge bug now fixed). Moves seasons/games to the correct legacy snake_case path, then deletes the orphaned UID doc.
Run the Aggregator afterward.
๐ง Bulk Email Update
Upload a CSV or Excel file to update the email field in users/{id} for any player โ auth or non-auth. Matched by player name against the loaded player list.
๐ Expected format: Any CSV or Excel with at least a name column and an email column. You'll map the columns after upload.
Writes only the
Writes only the
email field to users/{documentId} โ no other fields touched.
๐ง
Click to upload or drag & drop
CSV, XLSX, or XLS
๐ Operation Log
Ready. Search for players to begin...