Clean test data from production DB (players + teams) #205

Open
opened 2026-03-28 16:45:09 +00:00 by forgejo_admin · 0 comments

Type

Feature

Lineage

Discovered during girls roster validation 2026-03-28. Test data pollutes the admin draft board (westside-app#129).

Repo

forgejo_admin/basketball-api

User Story

As an admin, I want to assign players to teams via draft board so that placement is transparent and trackable (WS-S6).

Context

Draft board at /admin/teams shows 39 unassigned players. ~20 are test accounts (Baby Betty, Creed draney, Deploy Test Girl, 10 Stress Test Girls, etc.) and 2 test teams (Test Elite Kings, Test Local Kings). These pollute the UI and make it unusable for coaches. Direct DB cleanup -- no code change, no PR needed.

File Targets

No file changes. Direct SQL operations:

  • DELETE test players (division='girls' AND parent email LIKE '%@example.com', plus Baby Betty, Creed draney, Demo Player, Test Player, Test Player Girls)
  • DELETE test teams (Test Elite Kings, Test Local Kings)
  • DELETE associated player_teams, registrations, email_log rows (FK cascade)

Files the agent should NOT touch:

  • Any source code -- this is data cleanup only

Acceptance Criteria

  • No test players visible on draft board
  • No test teams visible on draft board
  • Only real players remain (16 girls, ~25 boys)
  • No FK constraint violations

Test Expectations

  • SELECT count from players WHERE email LIKE '%@example.com' returns 0
  • SELECT count from teams WHERE name LIKE 'Test%' returns 0
  • Draft board loads without errors after cleanup
  • Run command: psql query verification

Constraints

  • Delete in correct FK order (email_log, orders, registrations, player_teams, players, teams)
  • Do NOT delete any real player or team data
  • Do NOT modify schema or code

Checklist

  • Test data removed
  • Verified via draft board
  • No unrelated changes
  • project-westside-basketball -- project this affects
  • westside-app#129 -- parent validation ticket
### Type Feature ### Lineage Discovered during girls roster validation 2026-03-28. Test data pollutes the admin draft board (westside-app#129). ### Repo `forgejo_admin/basketball-api` ### User Story As an admin, I want to assign players to teams via draft board so that placement is transparent and trackable (WS-S6). ### Context Draft board at `/admin/teams` shows 39 unassigned players. ~20 are test accounts (Baby Betty, Creed draney, Deploy Test Girl, 10 Stress Test Girls, etc.) and 2 test teams (Test Elite Kings, Test Local Kings). These pollute the UI and make it unusable for coaches. Direct DB cleanup -- no code change, no PR needed. ### File Targets No file changes. Direct SQL operations: - DELETE test players (division='girls' AND parent email LIKE '%@example.com', plus Baby Betty, Creed draney, Demo Player, Test Player, Test Player Girls) - DELETE test teams (Test Elite Kings, Test Local Kings) - DELETE associated player_teams, registrations, email_log rows (FK cascade) Files the agent should NOT touch: - Any source code -- this is data cleanup only ### Acceptance Criteria - [ ] No test players visible on draft board - [ ] No test teams visible on draft board - [ ] Only real players remain (16 girls, ~25 boys) - [ ] No FK constraint violations ### Test Expectations - [ ] SELECT count from players WHERE email LIKE '%@example.com' returns 0 - [ ] SELECT count from teams WHERE name LIKE 'Test%' returns 0 - [ ] Draft board loads without errors after cleanup - Run command: psql query verification ### Constraints - Delete in correct FK order (email_log, orders, registrations, player_teams, players, teams) - Do NOT delete any real player or team data - Do NOT modify schema or code ### Checklist - [ ] Test data removed - [ ] Verified via draft board - [ ] No unrelated changes ### Related - `project-westside-basketball` -- project this affects - `westside-app#129` -- parent validation ticket
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo_admin/basketball-api#205
No description provided.