Database
Manage DB
Browse collections and tables, and watch the CQRS timing pipeline.
Person Race Historyperson_race_history
Individual past race results, finishes, and DNFs achieved by a person across platforms and years.
π‘
Operational Purpose & Edge Invariants
Normalizes past race performances from UltraSignup, DUV, ITRA, and manual submissions. Powers career summary metrics, historic DNF rates, and predictive pacing calculations.
Relational Connections (2)
Table Columns & Types (19)
person_race_history| Column | PostgreSQL Type | Constraints | Default | Documentation |
|---|---|---|---|---|
| id | uuid | NOT NULLPK | gen_random_uuid() | Unique race history result identifier. |
| personId | uuid | NOT NULLFK -> people.idON DELETE CASCADE | β | Competitor person record. |
| externalProfileId | uuid | nullableFK -> person_external_profiles.idON DELETE SET NULL | β | Provenance external profile reference. |
| platform | externalPlatformEnum | NOT NULLEnum | β | Source platform (ultrasignup, strava, duv, itra, athlinks, custom). |
| raceName | text | NOT NULL | β | Official name of the historical race event. |
| raceDate | text | NOT NULL | β | ISO date string (YYYY-MM-DD) when the race took place. |
| distanceMeters | double precision | nullable | β | Official course distance in meters. |
| distanceLabel | text | nullable | β | Standard distance category label (e.g. "50K", "100M", "Marathon"). |
| elevationGainMeters | double precision | nullable | β | Total positive vertical elevation gain in meters. |
| elapsedSeconds | integer | nullable | β | Official net or gun elapsed finish duration in seconds. |
| finishTimeFormatted | text | nullable | β | Formatted time display string (e.g. "14:22:31"). |
| overallPlace | integer | nullable | β | Overall finisher position. |
| genderPlace | integer | nullable | β | Gender division finisher position. |
| categoryPlace | integer | nullable | β | Age-group or class division finisher position. |
| totalFinishers | integer | nullable | β | Total number of official finishers in that event edition. |
| status | raceHistoryStatusEnum | NOT NULLEnum | 'finished' | Outcome status: finished, dnf, dns, dq, in_progress, unknown. |
| sourceUrl | text | nullable | β | Direct URL to official published results page. |
| metadata | jsonb | nullable | β | Platform-specific fields like age at race, rank percentage, or weather notes. |
| createdAt | timestamp with time zone | NOT NULL | now() | Record creation timestamp. |
PostgreSQL Enums (1)
enum "race_history_status"
| Value | Label | Domain Meaning |
|---|---|---|
| 'finished' | Finished | Official verified finisher. |
| 'dnf' | Did Not Finish (DNF) | Withdrew or cut off before official finish line. |
| 'dns' | Did Not Start (DNS) | Registered but did not start the event. |
| 'dq' | Disqualified (DQ) | Disqualified by race officials. |
| 'in_progress' | In Progress | Active race currently underway. |
| 'unknown' | Unknown | Status unrecorded or unparseable from external source. |
Database Indexes (3)
| Index Name | Columns | Type | Query Performance Rationale |
|---|---|---|---|
| person_race_history_person_idx | (personId) | INDEX | Accelerates retrieval of career race history for a person. |
| person_race_history_date_idx | (raceDate) | INDEX | Enables chronological ordering and recent activity windows. |
| person_race_history_distance_idx | (distanceMeters) | INDEX | Optimizes querying comparable distance performances. |