sessions table
The sessions table in the Cord Powell Hot Dog Tracker schema has 13 columns, keyed by id, with 3 foreign keys to eaters, events and venues. 2 columns in session_dogs and personal_records reference it.
One sitting. hours_fasted and body_weight_kg are here because "why was that run good?" is unanswerable after the fact -- they cost two columns now and cannot be reconstructed later.
Columns (13)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| eater_id | uuid | not null, references eaters.id | Usually the principal (Cord). Rival sessions exist so head-to-head is possible. |
| event_id | uuid | references events.id | NULL for casual/practice eating. |
| venue_id | uuid | references venues.id | Set directly when there is no event. If event_id is set, prefer the venue on the event. |
| kind | session_kind | not null | |
| status | session_status | not null | |
| started_at | timestamptz | not null | |
| ended_at | timestamptz | NULL while in_progress. | |
| time_limit_seconds | integer | Self-imposed limit for practice runs; copied from the event for contests. | |
| hours_fasted | numeric(4,1) | Hours since the last meal. The cheapest covariate that actually explains a good run. | |
| body_weight_kg | numeric(5,2) | Same-day weight. Capacity tracks weight over a career; without this the trend is uninterpretable. | |
| notes | text | ||
| created_at | timestamptz | not null |
Indexes (4)
(eater_id)(event_id)(venue_id)(eater_id, started_at)
Relationships
sessions.eater_idreferenceseaters.idsessions.event_idreferencesevents.idsessions.venue_idreferencesvenues.idsession_dogs.session_idreferencessessionspersonal_records.session_idreferencessessions