migration: add check constraint + unique index for canonical

This commit is contained in:
Chris Parsons 2026-05-01 15:39:08 -07:00
parent 879c09a38d
commit 5732afd93b
3 changed files with 5724 additions and 0 deletions

View file

@ -0,0 +1,2 @@
CREATE UNIQUE INDEX IF NOT EXISTS "event_results_event_participant_unique" ON "event_results" USING btree ("scoring_event_id","season_participant_id");--> statement-breakpoint
ALTER TABLE "scoring_events" ADD CONSTRAINT "scoring_events_qualifying_require_tournament" CHECK (NOT "scoring_events"."is_qualifying_event" OR "scoring_events"."tournament_id" IS NOT NULL);

File diff suppressed because it is too large Load diff

View file

@ -624,6 +624,13 @@
"when": 1777666830394,
"tag": "0088_cheerful_norrin_radd",
"breakpoints": true
},
{
"idx": 89,
"version": "7",
"when": 1777675084016,
"tag": "0089_lonely_tigra",
"breakpoints": true
}
]
}