ProgramEnrollments table

The ProgramEnrollments table in the FitStack - V2 schema has 10 columns, keyed by Id, with 2 foreign keys to Programs and Users.

v1 coaching added `AssignedByCoachId` + `AssignedAt` here. v2 REMOVES both — see CoachAssignments (63).

Columns (10)

Columns of the ProgramEnrollments table
ColumnTypeConstraintsDescription
Iduuidprimary key, not null
ProgramIduuidnot null, references Programs.Id
UserIdtextnot null, references Users.Id
StartDatetimestamp with time zonenot null
EndDatetimestamp with time zone
IsActivebooleannot null
CreatedAttimestamp with time zonenot null
ModifiedAttimestamp with time zone
IsDeletedbooleannot null
DeletedAttimestamp with time zone

Indexes (1)

  • (UserId, ProgramId) unique (IX_ProgramEnrollments_UserId_ProgramId)

Relationships

  • ProgramEnrollments.ProgramId references Programs.Id
  • ProgramEnrollments.UserId references Users.Id