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)
| Column | Type | Constraints | Description |
|---|---|---|---|
| Id | uuid | primary key, not null, references Users.HealthProfileId | |
| UserId | text | not null, references Users.Id | |
| DateOfBirth | timestamp with time zone | ||
| Weight | double precision | kg. | |
| Height | double precision | cm. | |
| TargetWeight | double precision | ||
| ActivityLevel | integer | ||
| Gender | integer | ||
| FitnessExperienceLevel | integer | not null | |
| PreferredPlaceOfTraining | integer | not null | |
| DietaryRestrictions | integer | not null | |
| NutritionChallenges | integer | not null | |
| DietaryPreferences | integer | not null | |
| GoalType | integer | ||
| GoalSpeed | double precision | ||
| NutritionGoal | integer | ||
| WatchedMetrics | character varying(100) | not null | COMMA-JOINED HealthMetricType ordinals in a single string column. Not an array, not a join table — worth normalising. |
| BasalMetabolicRate | numeric(10,2) | ||
| TotalDailyEnergyExpenditure | numeric(10,2) | ||
| MetricsLastCalculatedAt | timestamp with time zone | ||
| LastTimeSinceHealthLogAdded | timestamp with time zone | ||
| LastHealthTrendsNotificationSent | timestamp with time zone | ||
| HasCompletedFullOnboarding | boolean | not null | |
| CreatedAt | timestamp with time zone | not null | |
| ModifiedAt | timestamp with time zone | ||
| IsDeleted | boolean | not null | |
| DeletedAt | timestamp with time zone |
Relationships
UserHealthProfiles.IdreferencesUsers.HealthProfileIdUserHealthProfiles.UserIdreferencesUsers.IdHealthMetricGoals.HealthProfileIdreferencesUserHealthProfilesHealthSummaries.AppHealthProfileIdreferencesUserHealthProfiles