Prefill desired_servings by base_servings when creating a recipe (closes #2479)

This commit is contained in:
Bernd Bestel
2024-02-23 18:09:55 +01:00
parent 85bff136de
commit ac26c5510b
2 changed files with 7 additions and 1 deletions

6
migrations/0237.sql Normal file
View File

@@ -0,0 +1,6 @@
CREATE TRIGGER recipes_desired_servings_default AFTER INSERT ON recipes
BEGIN
UPDATE recipes
SET desired_servings = base_servings
WHERE id = NEW.id;
END;