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