-
Notifications
You must be signed in to change notification settings - Fork 0
feat(core): add pro-league schema for professional lacrosse data #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Add database schema and transform layer for storing professional lacrosse league data (PLL, NLL, MLL, MSL, WLA) extracted from external APIs. Schema: - pro_league: League reference table (pll, nll, mll, msl, wla) - pro_season: Season per league with external IDs - pro_team: Teams with logos, colors, external IDs - pro_player: Players with demographics, cross-league matching - pro_player_season: Roster + stats (JSONB) per season - pro_game: Games with scores, venue, status - pro_standings: Team standings with daily snapshots - pro_data_ingestion: Extraction provenance tracking Transform layer: - NLL transforms: teams, players, player-seasons, games, standings - PLL transforms: teams, players, player-seasons, events→games, standings - LoadService: orchestrates file→transform→bulk upsert workflow Co-Authored-By: Claude Opus 4.5 <[email protected]>
Code ReviewSummaryThis PR adds comprehensive database schema and service layers for professional lacrosse league data (PLL, NLL, MLL, MSL, WLA). It includes 8 database tables, repository patterns, service layer with Effect-TS, and transform functions to normalize data from external APIs. The implementation follows the project architecture well with proper separation of concerns. Title Convention✅ Title follows conventional commit format: FeedbackArchitecture & Patterns (Strong)
Critical Issues
Medium Priority Issues
Minor Issues
SuggestionsHigh Priority:
Medium Priority:
Low Priority:
Test Coverage:
Security & Performance Notes:
OverallStrong implementation with excellent architecture and proper use of Effect-TS patterns. The database schema design is well thought out with appropriate indexes and constraints. Main concerns are bulk operation performance, a few missing error handlers, and type safety bypasses via assertions. These issues should be addressed before merge, especially the critical performance and bug fixes. Grade: B+ - Solid work that follows project patterns, but needs fixes for production readiness. Auto-generated review by Claude |
Summary
Schema tables
pro_league: League reference (pll, nll, mll, msl, wla)pro_season: Season per league with external IDspro_team: Teams with logos, colors, external IDspro_player: Players with demographics, cross-league matching viacanonical_player_idpro_player_season: Roster + stats (JSONB) per seasonpro_game: Games with scores, venue, statuspro_standings: Team standings with daily snapshots for time-seriespro_data_ingestion: Extraction provenance trackingTransform layer
Record<string, unknown>for JSONB flexibilityTest plan
bun run typecheckpassesbun run db:generatecreates migrationbun run deployapplies migration to PlanetScaleloadNLLSeason("225", "output/nll/225")🤖 Generated with Claude Code