use foreign key
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Torma Kristóf 2022-02-13 21:06:52 +01:00
parent 794721a0cb
commit da7dd7eec6

View File

@ -6,3 +6,4 @@ class Ingredient(db.Model):
__tablename__ = 'Ingredient' __tablename__ = 'Ingredient'
id = db.Column(db.Integer, primary_key=True) id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String, nullable=False, unique=True) name = db.Column(db.String, nullable=False, unique=True)
meal_id = db.Column(db.Integer, db.ForeignKey('Meal.id'))