- SeasonStandings: highlight rows for the logged-in user's drafted participants with electric accent (in-points) or muted (outside points) left border + star icon - Loader: derive userParticipantIds from current user's teams and draft picks - EventSchedule: hide type badge for schedule_event; show "Results Pending" only when event is past and not yet marked complete (matches admin page logic) Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
20 lines
856 B
SQL
20 lines
856 B
SQL
-- Consolidate single_elimination_playoff and page_playoff → playoff_bracket
|
|
-- PostgreSQL does not support DROP VALUE on enums, so we recreate the type.
|
|
|
|
-- Step 1: Create new consolidated enum
|
|
CREATE TYPE "scoring_pattern_new" AS ENUM('playoff_bracket', 'season_standings', 'qualifying_points');
|
|
|
|
-- Step 2: Migrate column data, mapping old values to playoff_bracket
|
|
ALTER TABLE "sports_seasons"
|
|
ALTER COLUMN "scoring_pattern" TYPE "scoring_pattern_new"
|
|
USING (
|
|
CASE scoring_pattern::text
|
|
WHEN 'single_elimination_playoff' THEN 'playoff_bracket'::scoring_pattern_new
|
|
WHEN 'page_playoff' THEN 'playoff_bracket'::scoring_pattern_new
|
|
ELSE scoring_pattern::text::scoring_pattern_new
|
|
END
|
|
);
|
|
|
|
-- Step 3: Replace old type
|
|
DROP TYPE "scoring_pattern";
|
|
ALTER TYPE "scoring_pattern_new" RENAME TO "scoring_pattern";
|