This commit is contained in:
parent
db93e9578c
commit
9c61a10d90
@ -5,6 +5,6 @@ from .db import db
|
|||||||
class Ingredient(db.Model):
|
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(255), nullable=False, unique=True)
|
name = db.Column(db.String(255), nullable=False)
|
||||||
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')
|
meal = db.relationship('Meal', back_populates='ingredients')
|
||||||
|
Loading…
Reference in New Issue
Block a user