This commit is contained in:
parent
65580173d0
commit
fd5a2f6794
@ -7,4 +7,4 @@ class Ingredient(db.Model):
|
||||
id = db.Column(db.Integer, primary_key=True)
|
||||
name = db.Column(db.String(255), nullable=False, unique=True)
|
||||
meal_id = db.Column(db.Integer, db.ForeignKey('Meal.id'))
|
||||
meal = db.relationship('Meal', back_populates='Ingredient', lazy='dynamic')
|
||||
meal = db.relationship('Meal', back_populates='ingredients', lazy='dynamic')
|
||||
|
@ -12,4 +12,4 @@ class Meal(db.Model):
|
||||
spicy = db.Column(db.Boolean, nullable=True, default=False)
|
||||
vegan = db.Column(db.Boolean, nullable=True, default=False)
|
||||
glutenfree = db.Column(db.Boolean, nullable=True, default=False)
|
||||
ingredients = db.relationship('Ingredient', back_populates='Meal', lazy='dynamic')
|
||||
ingredients = db.relationship('Ingredient', back_populates='meal', lazy='dynamic')
|
||||
|
Loading…
Reference in New Issue
Block a user