CoachClientStatusEvents table

The CoachClientStatusEvents table in the FitStack - V2 schema has 7 columns, keyed by Id, with 2 foreign keys to CoachClients and Users.

v2 ADD. Append-only. Answers "when was I paused, and by whom". No audit columns — this IS the audit.

Columns (7)

Columns of the CoachClientStatusEvents table
ColumnTypeConstraintsDescription
Iduuidprimary key, not null
CoachClientIduuidnot null, references CoachClients.IdCASCADE.
FromStatustext`CoachClientStatus`.
ToStatustextnot null`CoachClientStatus`.
ActorUserIdtextreferences Users.Id
Reasoncharacter varying(2000)
OccurredAttimestamp with time zonenot null

Indexes (1)

  • (CoachClientId, OccurredAt) (IX_CoachClientStatusEvents_CoachClientId_OccurredAt)

Relationships

  • CoachClientStatusEvents.CoachClientId references CoachClients.Id
  • CoachClientStatusEvents.ActorUserId references Users.Id