Shopping list (WIP)
This commit is contained in:
parent
ce3821b94e
commit
084be9fb00
16 changed files with 296 additions and 90 deletions
|
|
@ -177,6 +177,7 @@ CREATE TABLE [RecipeScheduled] (
|
|||
FOREIGN KEY([recipe_id]) REFERENCES [Recipe]([id]) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
CREATE INDEX [RecipeScheduled_user_id_index] ON [RecipeScheduled]([user_id]);
|
||||
CREATE INDEX [RecipeScheduled_date_index] ON [RecipeScheduled]([date]);
|
||||
|
||||
CREATE TABLE [ShoppingEntry] (
|
||||
|
|
@ -200,6 +201,8 @@ CREATE TABLE [ShoppingEntry] (
|
|||
FOREIGN KEY([recipe_scheduled_id]) REFERENCES [RecipeScheduled]([id]) ON DELETE SET NULL
|
||||
);
|
||||
|
||||
CREATE INDEX [ShoppingEntry_user_id_index] ON [ShoppingEntry]([user_id]);
|
||||
|
||||
-- When an ingredient is deleted, its values are copied to any shopping entry
|
||||
-- that referenced it.
|
||||
CREATE TRIGGER [Ingredient_trigger_delete]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue