MealPlanEnrollments table

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

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

Columns (10)

Columns of the MealPlanEnrollments table
ColumnTypeConstraintsDescription
Iduuidprimary key, not null
MealPlanIduuidnot null, references MealPlans.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, MealPlanId) unique (IX_MealPlanEnrollments_UserId_MealPlanId)

Relationships

  • MealPlanEnrollments.MealPlanId references MealPlans.Id
  • MealPlanEnrollments.UserId references Users.Id