mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 20:26:42 +00:00
Prefill desired_servings by base_servings when creating a recipe (closes #2479)
This commit is contained in:
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
### Recipes
|
### Recipes
|
||||||
|
|
||||||
- xxx
|
- Optimized that when creating a recipe, the desired serving amount is now initially prefilled by the recipe's base serving amount
|
||||||
|
|
||||||
### Meal plan
|
### Meal plan
|
||||||
|
|
||||||
|
6
migrations/0237.sql
Normal file
6
migrations/0237.sql
Normal 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;
|
Reference in New Issue
Block a user