claude/sports-templates-conversion-ILWAM #71

Merged
chrisp merged 3 commits from claude/sports-templates-conversion-ILWAM into main 2026-06-04 21:31:49 +00:00
Owner
No description provided.
chrisp added 2 commits 2026-06-04 20:54:55 +00:00
Templates previously referenced specific sports seasons (e.g. "NFL 2026"), requiring
admins to create a new template every year. Templates now reference sports directly
(e.g. "NFL") and resolve to the currently-draftable season at league-creation time.

- Remove `year` field from season_templates table
- Replace `sportsSeasonId` FK with `sportId` FK in season_template_sports
- applySportsFromTemplate now resolves each sport to its active draftable season
- Admin template UI updated to manage sports (not specific seasons)
- sports-data-sync export/import updated to the new sport-centric format

https://claude.ai/code/session_01CoRLHERakMncbPs877izvw
Fix 5 code review issues in sport-based template conversion
Some checks failed
🚀 Deploy / 🧪 Test (pull_request) Successful in 3m11s
🚀 Deploy / ʦ🔍 Typecheck & Lint (pull_request) Failing after 51s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
553c565951
- Migration (0114): TRUNCATE season_template_sports before adding NOT NULL sport_id
  column to prevent failure on non-empty tables
- findDraftableSportsSeasonBySportId: add orderBy(year DESC, draftOn DESC) so the
  newest season is returned deterministically when multiple draft windows overlap
- leagues/new.tsx loader: build a Map from the already-fetched allSportsSeasons
  instead of firing N×M per-sport DB queries (eliminates ~30 redundant queries)
- schema: add UNIQUE(templateId, sportId) on season_template_sports to prevent
  duplicate sport entries via concurrent requests
- schema: add UNIQUE(name) on season_templates so import merge-mode lookup by
  name is unambiguous (migration 0115)

https://claude.ai/code/session_01CoRLHERakMncbPs877izvw
chrisp added 1 commit 2026-06-04 21:15:05 +00:00
Fix lint errors: shadow eq import and != operator
All checks were successful
🚀 Deploy / 🧪 Test (pull_request) Successful in 2m26s
🚀 Deploy / ʦ🔍 Typecheck & Lint (pull_request) Successful in 1m19s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
b13822c474
https://claude.ai/code/session_01CoRLHERakMncbPs877izvw
chrisp merged commit f657293430 into main 2026-06-04 21:31:49 +00:00
Sign in to join this conversation.
No description provided.