eaters table
The eaters table in the Cord Powell Hot Dog Tracker schema has 7 columns, keyed by id. 2 columns in sessions and personal_records reference it.
Cord plus his benchmarks. Deliberately NOT tied to an application user account: a rival needs to be logged, not signed up -- requiring a login to record someone would silently cap the rival set at "people who installed the app", which is the wrong set. Cord needs to log the guy who beat him at a fair, and that guy will never install anything. is_principal is what makes this a Cord Powell app rather than a generic tracker.
Columns (7)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| display_name | text | not null | e.g. Cord Powell |
| nickname | text | Ring name. Optional, but come on. | |
| is_principal | boolean | not null | TRUE for Cord Powell and nobody else. Enforce with a partial unique index: CREATE UNIQUE INDEX ON eaters ((true)) WHERE is_principal. A flag rather than a hardcoded id, so the subject is data the app can query for rather than a constant compiled into it. |
| debut_at | date | First logged session; anchors the career trend line. | |
| is_active | boolean | not null | |
| created_at | timestamptz | not null |
Indexes (2)
(display_name)(is_principal)
Relationships
sessions.eater_idreferenceseaterspersonal_records.eater_idreferenceseaters