Database
Manage DB
Browse collections and tables, and watch the CQRS timing pipeline.
Time Allowancestime_allowances
Mandatory medical holds, safety stops, and hazard holds deducted from net elapsed time.
π‘
Operational Purpose & Edge Invariants
Used during extreme weather, medical evaluations (e.g. mandatory 45-minute hydration hold in 100-mile ultras), or trail blockages (trains, mudslides, downed trees). The duration is automatically credited back to the competitor's adjusted net time and dynamically extends downstream aid station cutoffs so runners aren't penalized for safety holds.
Relational Connections (2)
Table Columns & Types (10)
time_allowances| Column | PostgreSQL Type | Constraints | Default | Documentation |
|---|---|---|---|---|
| id | uuid | NOT NULLPK | gen_random_uuid() | Unique time allowance identifier. |
| entrantId | uuid | NOT NULLFK -> entrants.id | β | Competitor. |
| splitId | uuid | NOT NULLFK -> courseSplits.id | β | Checkpoint location. |
| startTime | timestamp with time zone | NOT NULL | β | Hold start timestamp. |
| endTime | timestamp with time zone | NOT NULL | β | Hold release timestamp. |
| durationSeconds | integer | NOT NULL | β | Total credited seconds deducted from net elapsed time. |
| reason | text | NOT NULL | β | Hold reason: 'medical_hold', 'hazard_hold', 'gear_check'. |
| authorizedByPersonId | uuid | NOT NULLFK -> people.id | β | Authorizing medical officer or race steward. |
| notes | text | nullable | β | Detailed medical or safety incident narrative. |
| createdAt | timestamp with time zone | NOT NULL | now() | Creation timestamp. |
Database Indexes (1)
| Index Name | Columns | Type | Query Performance Rationale |
|---|---|---|---|
| time_allowances_entrant_idx | (entrantId) | INDEX | Accelerates retrieval of all active credits during net standings calculations. |