Seed practice_schedules table with Spring/Summer 2026 schedule #279
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/basketball-api#279
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Lineage
Standalone — discovered while verifying schedule data exists in the database. Schedule note (
westside-practice-schedule) has all 17 slots butpractice_schedulestable has 0 rows.Repo
forgejo_admin/basketball-apiUser Story
As an admin,
I want the approved practice schedule populated in the database
So that the public schedule page and admin dashboard show real data instead of being empty.
Context
The
practice_schedulestable (migration 029) and CRUD endpoints (/admin/schedule/practices) are deployed and working. All 7 teams exist in theteamstable with correct IDs. Butpractice_scheduleshas 0 rows — the schedule only lives in the pal-e-docs note (westside-practice-schedule).Season starts April 6, 2026. This is data seeding only — no schema or code changes.
File Targets
Files the agent should modify:
scripts/seed_schedule.py— existing seed script; add the 17 practice_schedule INSERT calls using the admin API or SQLAlchemy sessionFiles the agent should NOT touch:
src/basketball_api/models.py— schema is correct as-issrc/basketball_api/routes/schedule.py— endpoints are correct as-isalembic/versions/*— no migration neededAcceptance Criteria
practice_scheduleswith correct team_id, day_of_week, times, locationsGET /admin/schedule/practicesreturns all 17 rowsData to insert (tenant_id=1 for all):
Test Expectations
SELECT count(*) FROM practice_schedules= 17curl /admin/schedule/practicesreturns 17 itemskubectl exec -n basketball-api postgres-... -- psql -U basketball -d basketball -c "SELECT count(*) FROM practice_schedules;"Constraints
westside-practice-schedulenote in pal-e-docsscripts/seed_schedule.pyconvention (Python, not raw SQL)Checklist
Related
westside-basketball-- project this affectswestside-practice-schedule-- pal-e-docs source noteScope Review: NEEDS_REFINEMENT
Review note:
review-739-2026-04-03Template is complete and traceability is solid (story:WS-S13 verified), but two issues need resolution before dispatch:
start_time/end_timeareMapped[str](non-nullable) in the SQLAlchemy model, but AC #2 requires NULL for Sunday rows. Either use a sentinel value ("TBD") or acknowledge a model change + migration is in scope.scripts/seed_schedule.pyalready exists with placeholder data. Clarify whether to update it (repo convention) or create newscripts/seed_practice_schedules.sql.arch-schedulearchitecture note does not exist in pal-e-docs. Needs creation.Scope refinement (review-739-2026-04-03):
scripts/seed_practice_schedules.sqlto existingscripts/seed_schedule.py(repo convention is Python seed scripts).arch:scheduletoarch:basketball-api(no backing arch note forarch:schedule).Scope Review: READY
Review note:
review-739-2026-04-03-r2Re-review after refinement — all 3 previous NEEDS_REFINEMENT issues resolved (NULL times fixed, seed script path corrected, arch label improved).
labelcolumn (non-nullable) not in data table — agent can derive from Team + day context, not blocking.[SCOPE]Createarch-basketball-apiarchitecture note as separate backlog item (project-wide gap).Seed Complete
Inserted 17 rows into
practice_schedulesvia direct SQL on the production postgres pod.Verification
Row count: 17
No NULL times: 0 rows with NULL start_time or end_time
Full schedule (joined with teams):
Data-only task -- no code changes, no PR needed.