Database

Manage DB

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

← Overviewβ€’Write Plane (Audit Ledger)Immutable Append-Only

Raw Timing Eventsraw_timing_events

High-frequency ingestion ledger recording raw timing pulses in UTC with device telemetry.

Table Columns & Types (15)

raw_timing_events
ColumnPostgreSQL TypeConstraintsDefaultDocumentation
iduuid
NOT NULLPK
gen_random_uuid()Unique raw timing event identifier.
eventGroupIduuid
NOT NULLFK -> eventGroups.id
β€”Weekend event group.
competitorNumbertext
NOT NULL
β€”Bib / Plate / Car number passed into reader.
timingPointCodetext
NOT NULL
β€”Station code (e.g. "TWIN_LAKES").
subSplitKindsubSplitKindEnum
NOT NULLEnum
β€”'in' (arrival), 'out' (departure), or 'point' (flying line).
recordedTimeUtctimestamp(3) with time zone
NOT NULL
β€”Precision 3 (millisecond) absolute UTC pulse timestamp.
sourcetimingSourceEnum
NOT NULLEnum
β€”Hardware telemetry origin (rfid, optical, manual, mobile app, ham radio, webhook).
sourceDeviceIdtext
nullable
β€”Reading hardware identifier (e.g. "ipad-station-4").
recordedByPersonIduuid
nullableFK -> people.id
β€”Person who entered the time. Null for unattended sources; radio operator callsigns are kept in rawPayload.
syncBatchIduuid
nullable
β€”Batch UUID for offline IndexedDB bulk sync sessions.
withPacerboolean
NOT NULL
falseIndicates runner was accompanied by a registered pacer.
rawPayloadjsonb
nullable
β€”Original hardware telemetry packet (RSSI, signal strength, antenna port).
statusrawTimingStatusEnum
NOT NULLEnum
'unprocessed'Pulse validation lifecycle: 'unprocessed', 'matched', 'duplicate_subordinate', 'rejected_invalid', 'flagged_discrepancy'.
auditNotetext
nullable
β€”Official explanation if marked invalid or flagged.
createdAttimestamp with time zone
NOT NULL
now()Ingestion timestamp.

PostgreSQL Enums (3)

enum "sub_split_kind"

ValueLabelDomain Meaning
'in'In (Arrival)Checkpoint entry; aid station dwell start.
'out'Out (Departure)Checkpoint exit; cutoff enforcement line.
'point'Point (Flying Gate)Instantaneous single flying gate / intermediate mat.

enum "timing_source"

ValueLabelDomain Meaning
'rfid_transponder'RFID TransponderAutomated chip mat (RaceResult, ChronoTrack).
'optical_photocell'Optical PhotocellLaser beam photocell gate (downhill MTB finish).
'manual_web_entry'Manual Web EntryVolunteer checkpoint web console.
'mobile_offline_app'Mobile Offline PWAField volunteer tablet caching in IndexedDB.
'mt63_ham_radio'MT63 Ham RadioDigital acoustic modem packet over VHF/UHF amateur radio.
'api_webhook'API WebhookExternal timing service API integration.

enum "raw_timing_status"

ValueLabelDomain Meaning
'unprocessed'UnprocessedIngested, awaiting background worker scoring.
'matched'MatchedSuccessfully bound to an entrant scored split.
'duplicate_subordinate'Duplicate SubordinateSubordinate backup pulse within cluster window.
'rejected_invalid'Rejected InvalidSteward invalidated entry (e.g. false trigger, typo).
'flagged_discrepancy'Flagged DiscrepancyVariance with primary hardware exceeds threshold.

Database Indexes (4)

Index NameColumnsTypeQuery Performance Rationale
raw_events_eg_comp_idx(eventGroupId, competitorNumber)INDEXAccelerates chronological athlete pulse extraction for scoring reconciliation.
raw_events_time_idx(recordedTimeUtc)INDEXOptimizes time-window replay and telemetry streaming queries.
raw_events_batch_idx(syncBatchId)INDEXEnables fast audit tracking of offline batch sync sessions.
raw_events_status_idx(status)INDEXAllows worker queues to rapidly poll for 'unprocessed' records.