๐Ÿ‘ฅ 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)
  1. Search for player name variants (e.g., "Joe Smith" and "Joseph Smith")
  2. Select the records to merge as Source (data moves FROM these)
  3. Select ONE record as the Target (data moves TO this)
  4. Preview shows actual playerStats and pitchingStats data
  5. Execute merge moves all season/game docs and deletes source docs
  6. 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/*
  • pitchingStats subcollections 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
๐Ÿ“‹ Operation Log
Ready. Search for players to begin...