Logo

Club Admin Portal

Staff roster migration

Exit

Loading…

{{ errorBanner }}

Firestore staff overlay

Each document uses the same id as players/{id}. Pure staff are hidden from player lists and lineups; people who are also registered as tackle/tag players or who have stats on their player doc still appear everywhere they should.

{{ selectedCount }} selected ({{ visibleSelectedCount }} visible in table)

Backfill teamIds[]

Populates the new teamIds array and teamAssignments sub-collection on every player document that already has a teamId scalar. Run this once after deploying the new import logic. Safe to re-run — uses setDoc merge:true and arrayUnion.

{{ line }}

Backup — download players collection

Downloads all player documents as a timestamped JSON file. Run this before Phase 4 cleanup so you have a local restore point.

{{ backupMessage }}

Phase 4 cleanup — delete teamId scalar

Removes the legacy teamId scalar field from every player document. Run only after the backfill is complete and Phase 3 queries have been verified. Irreversible — confirm before running.

{{ line }}

Deduplicate player documents

Groups docs by NRL ID then email. For each group with more than one doc, merges teamIds[] and parentIds[] into the primary doc, copies any missing fields, then deletes the duplicates. Take a backup first.

No duplicates found.

{{ g.primaryName }} ({{ g.matchKey }})

Primary: {{ g.primary.id }} · {{ g.primaryTeams }}

Dup {{ j+1 }}: {{ d.id }} · {{ teamLabel(( d.teamIds || [])[0] || d.teamId) }}

→ Merged teamIds: {{ g.mergedTeamNames }}

{{ line }}

Actions
{{ listPlayerName(row) }} {{ teamLabel(row.teamId) }} Yes No Yes Legacy

Showing {{ filteredRows.length }} of {{ players.length }} player documents.