πŸ”§ Fix Bulk-Upload Game Stats

Finds playerStats and pitchingStats game docs where the CSV bulk-upload used a self-constructed gameDocId (season prefix baked in, hyphens in date) instead of the real Firestore game document ID. Copies each doc to the correct path and deletes the old one.

⚠️ You must be signed in as an admin to run this script.

β€”
Bad docs found
β€”
Matched to game
β€”
Unmatched (no fix)
β€”
Fixed
β€”
Errors

Log

πŸ“… Date Mismatch Scanner

Finds game docs where the date baked into gameDocId doesn't match gameDateFormatted. This catches docs uploaded with the wrong CSV date (e.g. 5/22 instead of 5/21) that passed the normal format check. The doc's gameDateFormatted must already be corrected via the editor before running this.


β€”
Mismatches found
β€”
Matched to game
β€”
Unmatched (no fix)
β€”
Fixed
β€”
Errors

πŸ’£ Out-of-Park Home Run Tracker

Manually flag true out-of-park HRs. These display as a πŸ’£ badge on the current-season HR leaderboard.

πŸ“Š Scan from Stats Reads aggregatedPlayerStats for the season above and compares against flagged records
πŸ’£ Flagged Records
Loading records…