UserHealthProfiles table

The UserHealthProfiles table in the FitStack - V2 schema has 27 columns, keyed by Id, with 2 foreign keys to Users. 2 columns in HealthMetricGoals and HealthSummaries reference it.

Principal of the 1:1 from Users.HealthProfileId. The most sensitive table in the schema.

Columns (27)

Columns of the UserHealthProfiles table
ColumnTypeConstraintsDescription
Iduuidprimary key, not null, references Users.HealthProfileId
UserIdtextnot null, references Users.Id
DateOfBirthtimestamp with time zone
Weightdouble precisionkg.
Heightdouble precisioncm.
TargetWeightdouble precision
ActivityLevelinteger
Genderinteger
FitnessExperienceLevelintegernot null
PreferredPlaceOfTrainingintegernot null
DietaryRestrictionsintegernot null
NutritionChallengesintegernot null
DietaryPreferencesintegernot null
GoalTypeinteger
GoalSpeeddouble precision
NutritionGoalinteger
WatchedMetricscharacter varying(100)not nullCOMMA-JOINED HealthMetricType ordinals in a single string column. Not an array, not a join table — worth normalising.
BasalMetabolicRatenumeric(10,2)
TotalDailyEnergyExpenditurenumeric(10,2)
MetricsLastCalculatedAttimestamp with time zone
LastTimeSinceHealthLogAddedtimestamp with time zone
LastHealthTrendsNotificationSenttimestamp with time zone
HasCompletedFullOnboardingbooleannot null
CreatedAttimestamp with time zonenot null
ModifiedAttimestamp with time zone
IsDeletedbooleannot null
DeletedAttimestamp with time zone

Relationships