Fix migration 0068: add IF NOT EXISTS to enum ADD VALUE

The migration fails in production because the enum label
"cs2_major_qualifying_points" already exists. Adding IF NOT EXISTS
makes the statement idempotent so it won't error on re-run.

https://claude.ai/code/session_015iUtjSgiL1ZUNggvj434gP
This commit is contained in:
Claude 2026-04-06 15:06:01 +00:00
parent 1ee0d51fb3
commit 3c26ab46af
No known key found for this signature in database

View file

@ -1,4 +1,4 @@
ALTER TYPE "public"."simulator_type" ADD VALUE 'cs2_major_qualifying_points';--> statement-breakpoint ALTER TYPE "public"."simulator_type" ADD VALUE IF NOT EXISTS 'cs2_major_qualifying_points';--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "cs2_major_stage_results" ( CREATE TABLE IF NOT EXISTS "cs2_major_stage_results" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"scoring_event_id" uuid NOT NULL, "scoring_event_id" uuid NOT NULL,