Creating new qualifying scoring_events or season_participants now auto-upserts the matching canonical rows. Needed so the check constraint doesn't reject qualifying events, and so new season participants flow through syncTournamentResults. - Extract tournament identity shared between backfill and event-creation into app/lib/tournament-identity.ts; scripts/backfill re-exports it. - createScoringEvent + bulkCreateScoringEvents now accept tournamentId. - Event creation routes auto-compute (name, year) and upsert tournament. - createParticipant + createManyParticipants auto-link to canonical participants by (sportId, name). Phase 3 Task 7 of canonical tournament layer migration. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
11 lines
373 B
TypeScript
11 lines
373 B
TypeScript
/**
|
|
* Re-exports the canonical tournament identity extractor. The implementation
|
|
* lives in `app/lib/tournament-identity.ts` so it can be shared by the
|
|
* Phase 2 backfill and by the admin event-creation flow.
|
|
*/
|
|
|
|
export {
|
|
extractTournamentIdentity,
|
|
type TournamentIdentity,
|
|
type ScoringEventIdentityInput as ScoringEventInput,
|
|
} from "~/lib/tournament-identity";
|