Workouts table

The Workouts table in the FitStack - V2 schema has 23 columns, keyed by Id, with 4 foreign keys to WorkoutEmbeddings, Users, Programs and Media. 6 columns in WorkoutBlockTemplates, ProgramWorkouts, WorkoutLogs, WorkoutSessions and 2 more reference it.

The marketplace columns (PriceCents..StripePriceId) repeat identically on Programs, Meals, MealPlans and FitnessPlans — see 52.

Columns (23)

Columns of the Workouts table
ColumnTypeConstraintsDescription
Iduuidprimary key, not null, references WorkoutEmbeddings.EntityId
Nametextnot null
Descriptiontextnot null
Slugcharacter varying(160)not nullAssigned at SaveChanges by Persistence/Services/SlugFallback.cs.
CreatedByIdtextnot null, references Users.Id
ProgramIduuidreferences Programs.Id
ImageIduuidreferences Media.Id
EstimatedDurationintervalnot null
DifficultyLevelintegernot null
IsPublicbooleannot null
IsVerifiedbooleannot null
OrderInPrograminteger
IsSnapshotbooleannot nullA frozen copy taken when a program version was published.
OriginalWorkoutIduuidPoints at the source when IsSnapshot. No FK.
PriceCentsintegernot null
Currencycharacter varying(3)not null
IsListedbooleannot null
StripeProductIdtext
StripePriceIdtext
CreatedAttimestamp with time zonenot null
ModifiedAttimestamp with time zone
IsDeletedbooleannot null
DeletedAttimestamp with time zone

Indexes (1)

  • (Slug) unique (IX_Workouts_Slug)

Relationships