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)
| Column | Type | Constraints | Description |
|---|---|---|---|
| Id | uuid | primary key, not null | |
| ProgramId | uuid | not null, references Programs.Id | |
| UserId | text | not null, references Users.Id | |
| StartDate | timestamp with time zone | not null | |
| EndDate | timestamp with time zone | ||
| IsActive | boolean | not null | |
| CreatedAt | timestamp with time zone | not null | |
| ModifiedAt | timestamp with time zone | ||
| IsDeleted | boolean | not null | |
| DeletedAt | timestamp with time zone |
Indexes (1)
(UserId, ProgramId)unique (IX_ProgramEnrollments_UserId_ProgramId)
Relationships
ProgramEnrollments.ProgramIdreferencesPrograms.IdProgramEnrollments.UserIdreferencesUsers.Id