Files
CookIT/docs/adr/0002-recipe-parts-stored-as-json.md
2026-10-28 22:55:09 +01:00

8 lines
649 B
Markdown

# A Recipe's parts are stored as JSON columns on its row
Ingredient Groups and Lines, Step Sections, Photos, Tags, Sources and Review Flag reasons are stored as JSON in the `recipes` table rather than in their own tables. A Recipe is always loaded, edited and saved as a whole, and search runs in memory over a collection of a few hundred Recipes. Separate tables would add joins and position bookkeeping and gain nothing yet.
## Consequences
If a later feature needs to query across ingredients in SQL (e.g. a shopping list that sums the same ingredient over a Meal Plan), extract them into their own table with a drift migration at that point.