MealLogs table
The MealLogs table in the FitStack - V2 schema has 32 columns, keyed by Id, with 4 foreign keys to Users, Meals, Recipes and Media. 4 columns in MealLogIngredients, MealLogReviews, InstacartOrderRequests and ScheduledItems reference it.
In v1 every insert here was pushed to all active coaches over SignalR with no consent — see 62.
Columns (32)
| Column | Type | Constraints | Description |
|---|---|---|---|
| Id | uuid | primary key, not null | |
| UserId | text | not null, references Users.Id | |
| MealId | uuid | references Meals.Id | |
| RecipeId | uuid | references Recipes.Id | |
| PhotoId | uuid | references Media.Id | |
| MealName | text | not null | |
| MealType | integer | not null | |
| Date | date | not null | |
| ConsumedAt | timestamp with time zone | not null | |
| Description | text | ||
| Calories | numeric | ||
| Protein | numeric | ||
| Carbohydrates | numeric | ||
| Fat | numeric | ||
| Fiber | numeric | ||
| Sugar | numeric | ||
| Sodium | numeric | ||
| Cholesterol | numeric | ||
| SaturatedFat | numeric | ||
| ServingSize | text | ||
| IsSnack | boolean | not null | |
| IsBeverage | boolean | not null | |
| IsPublic | boolean | not null | |
| IsDraft | boolean | not null | |
| ImageUrl | text | ||
| IsSynced | boolean | not null | |
| ExternalUuid | text | ||
| Notes | text | ||
| CreatedAt | timestamp with time zone | not null | |
| ModifiedAt | timestamp with time zone | ||
| IsDeleted | boolean | not null | |
| DeletedAt | timestamp with time zone |
Relationships
MealLogs.UserIdreferencesUsers.IdMealLogs.MealIdreferencesMeals.IdMealLogs.RecipeIdreferencesRecipes.IdMealLogs.PhotoIdreferencesMedia.IdMealLogIngredients.MealLogIdreferencesMealLogsMealLogReviews.MealLogIdreferencesMealLogsInstacartOrderRequests.MealLogIdreferencesMealLogsScheduledItems.MealLogIdreferencesMealLogs