MealLogIngredients table
The MealLogIngredients table in the FitStack - V2 schema has 13 columns, keyed by Id, with 2 foreign keys to MealLogs and Products.
Crosses into the `product` schema — the NutriScan side of the product.
Columns (13)
| Column | Type | Constraints | Description |
|---|---|---|---|
| Id | uuid | primary key, not null | |
| MealLogId | uuid | not null, references MealLogs.Id | |
| ProductId | uuid | references Products.Id | |
| ProductNameSnapshot | text | not null | |
| BrandNameSnapshot | text | ||
| PrimaryUpc | text | ||
| Quantity | numeric | not null | |
| Unit | character varying(32) | not null | `IngredientUnit` as TEXT. |
| SortOrder | integer | not null | |
| CreatedAt | timestamp with time zone | not null | |
| ModifiedAt | timestamp with time zone | ||
| IsDeleted | boolean | not null | |
| DeletedAt | timestamp with time zone |
Relationships
MealLogIngredients.MealLogIdreferencesMealLogs.IdMealLogIngredients.ProductIdreferencesProducts.Id