Database

Manage DB

Browse collections and tables, and watch the CQRS timing pipeline.

← Overviewβ€’Core HierarchyOperational Boundary

Event Groupsevent_groups

The fundamental weekend/venue grouping sharing physical bib space, timing points, and volunteers.

Table Columns & Types (11)

event_groups
ColumnPostgreSQL TypeConstraintsDefaultDocumentation
iduuid
NOT NULLPK
gen_random_uuid()Unique event group identifier.
organizationIduuid
NOT NULLFK -> organizations.id
β€”Owning organization.
nametext
NOT NULL
β€”Human-readable weekend title (e.g. "Wasatch 100 Weekend 2026").
slugtext
NOT NULL
β€”URL slug for the event weekend.
disciplinedisciplineEnum
NOT NULLEnum
β€”Sporting discipline defining scoring rules and calculation pipelines.
timeZonetext
NOT NULL
'UTC'IANA time zone the race runs in; scheduled starts are entered and shown in it.
locationtext
nullable
β€”Venue or town shown alongside the event group.
rulesConfigjsonb (RulesConfig)
NOT NULLZod Validated
β€”Event-level time formatting, precision decimals, TSD penalty factors, and backyard ultra rules.
startDatetimestamp with time zone
NOT NULL
β€”Weekend opening / venue access start timestamp.
endDatetimestamp with time zone
NOT NULL
β€”Weekend closing / course breakdown end timestamp.
createdAttimestamp with time zone
NOT NULL
now()Creation timestamp.

PostgreSQL Enums (1)

enum "discipline"

ValueLabelDomain Meaning
'trail_ultra'Trail UltraPoint-to-point, out-and-back, or multi-loop trail ultramarathons with aid station cutoffs.
'road_marathon'Road MarathonRoad distance events featuring mass/wave starts and gun vs. net chip timing.
'backyard_ultra'Backyard UltraLast Person Standing format with hourly elimination loops (4.167 miles every 60 min).
'fixed_time_loop'Fixed-Time LoopTimed endurance events (6h, 12h, 24h, 48h) maximizing completed mileage.
'downhill_mtb'Downhill MTBIndividual staggered flying finishes with millisecond photocell precision.
'xco_cycling'Cross-Country CyclingCross-country and gravel mass or wave races scored by completed laps and gun delta.
'tsd_regularity'TSD RegularityTime-Speed-Distance motorsport scoring based on absolute deviation from target passage times.

Polymorphic JSONB Schemas

Zod Discriminated Unions

RulesConfig

Configurable scoring rules controlling time format, precision, and penalty multipliers.

FieldTypeDescription
timeFormat'HH:MM:SS' | 'HH:MM:SS.sss' | 'MM:SS.sss'Display formatting pattern for web standings.
displayPrecisionDecimalsnumber (0-3)Number of decimal digits shown on public leaderboards.
allowSelfCheckInbooleanEnables racer self-service mobile check-in.
requirePacerRegistrationbooleanEnforces mandatory pacer bib registration before course entry.
earlyPenaltyFactornumber (default 2.0)TSD regularity penalty factor for premature checkpoint arrival (penalizes speeding).
latePenaltyFactornumber (default 1.0)TSD regularity penalty factor for late checkpoint arrival.
gracePeriodSecondsnumber (default 0.0)Deviation window before penalty points accrue.
yardDistanceMilesnumber (default 4.166667)Official loop distance for backyard ultras.
yardTimeLimitSecondsnumber (default 3600)Hourly time limit to complete each yard.

Database Indexes (2)

Index NameColumnsTypeQuery Performance Rationale
event_groups_org_idx(organizationId)INDEXAccelerates tenant-filtered event lookups in administrative portals.
event_groups_slug_idx(slug)INDEXOptimizes public URL route resolution.