From da7dd7eec6a7bd2f35946fba624880012fc3ea4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Sun, 13 Feb 2022 21:06:52 +0100 Subject: [PATCH] use foreign key --- mealapi/model/ingredient.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mealapi/model/ingredient.py b/mealapi/model/ingredient.py index 1524f22..8dc4c28 100644 --- a/mealapi/model/ingredient.py +++ b/mealapi/model/ingredient.py @@ -6,3 +6,4 @@ class Ingredient(db.Model): __tablename__ = 'Ingredient' id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String, nullable=False, unique=True) + meal_id = db.Column(db.Integer, db.ForeignKey('Meal.id'))