Database
Manage DB
Browse collections and tables, and watch the CQRS timing pipeline.
Event Groupsevent_groups
The fundamental weekend/venue grouping sharing physical bib space, timing points, and volunteers.
π‘
Operational Purpose & Edge Invariants
EventGroup represents races occurring on the same day/weekend sharing physical infrastructure (volunteers, timing gates, bib series, e.g. 100M, 50M, 20M). Raw timing pulses are ingested at the EventGroup level so field volunteers and transponder mats do not need to guess which race distance a runner is competing in.
Relational Connections (3)
β Belongs ToorganizationId
organizations βParent organization managing this race weekend.
β Has ManyeventGroupId
events βIndividual race distances and divisions competing within this weekend.
β Has ManyeventGroupId
rawTimingEvents βAll ingested raw timing pulses recorded across the entire weekend.
Table Columns & Types (11)
event_groups| Column | PostgreSQL Type | Constraints | Default | Documentation |
|---|---|---|---|---|
| id | uuid | NOT NULLPK | gen_random_uuid() | Unique event group identifier. |
| organizationId | uuid | NOT NULLFK -> organizations.id | β | Owning organization. |
| name | text | NOT NULL | β | Human-readable weekend title (e.g. "Wasatch 100 Weekend 2026"). |
| slug | text | NOT NULL | β | URL slug for the event weekend. |
| discipline | disciplineEnum | NOT NULLEnum | β | Sporting discipline defining scoring rules and calculation pipelines. |
| timeZone | text | NOT NULL | 'UTC' | IANA time zone the race runs in; scheduled starts are entered and shown in it. |
| location | text | nullable | β | Venue or town shown alongside the event group. |
| rulesConfig | jsonb (RulesConfig) | NOT NULLZod Validated | β | Event-level time formatting, precision decimals, TSD penalty factors, and backyard ultra rules. |
| startDate | timestamp with time zone | NOT NULL | β | Weekend opening / venue access start timestamp. |
| endDate | timestamp with time zone | NOT NULL | β | Weekend closing / course breakdown end timestamp. |
| createdAt | timestamp with time zone | NOT NULL | now() | Creation timestamp. |
PostgreSQL Enums (1)
enum "discipline"
| Value | Label | Domain Meaning |
|---|---|---|
| 'trail_ultra' | Trail Ultra | Point-to-point, out-and-back, or multi-loop trail ultramarathons with aid station cutoffs. |
| 'road_marathon' | Road Marathon | Road distance events featuring mass/wave starts and gun vs. net chip timing. |
| 'backyard_ultra' | Backyard Ultra | Last Person Standing format with hourly elimination loops (4.167 miles every 60 min). |
| 'fixed_time_loop' | Fixed-Time Loop | Timed endurance events (6h, 12h, 24h, 48h) maximizing completed mileage. |
| 'downhill_mtb' | Downhill MTB | Individual staggered flying finishes with millisecond photocell precision. |
| 'xco_cycling' | Cross-Country Cycling | Cross-country and gravel mass or wave races scored by completed laps and gun delta. |
| 'tsd_regularity' | TSD Regularity | Time-Speed-Distance motorsport scoring based on absolute deviation from target passage times. |
Polymorphic JSONB Schemas
Zod Discriminated UnionsRulesConfig
Configurable scoring rules controlling time format, precision, and penalty multipliers.
| Field | Type | Description |
|---|---|---|
| timeFormat | 'HH:MM:SS' | 'HH:MM:SS.sss' | 'MM:SS.sss' | Display formatting pattern for web standings. |
| displayPrecisionDecimals | number (0-3) | Number of decimal digits shown on public leaderboards. |
| allowSelfCheckIn | boolean | Enables racer self-service mobile check-in. |
| requirePacerRegistration | boolean | Enforces mandatory pacer bib registration before course entry. |
| earlyPenaltyFactor | number (default 2.0) | TSD regularity penalty factor for premature checkpoint arrival (penalizes speeding). |
| latePenaltyFactor | number (default 1.0) | TSD regularity penalty factor for late checkpoint arrival. |
| gracePeriodSeconds | number (default 0.0) | Deviation window before penalty points accrue. |
| yardDistanceMiles | number (default 4.166667) | Official loop distance for backyard ultras. |
| yardTimeLimitSeconds | number (default 3600) | Hourly time limit to complete each yard. |
Database Indexes (2)
| Index Name | Columns | Type | Query Performance Rationale |
|---|---|---|---|
| event_groups_org_idx | (organizationId) | INDEX | Accelerates tenant-filtered event lookups in administrative portals. |
| event_groups_slug_idx | (slug) | INDEX | Optimizes public URL route resolution. |