mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 14:33:33 -07:00
remove namespace
This commit is contained in:
parent
78f763a645
commit
fe25f354a3
2 changed files with 13 additions and 12 deletions
|
@ -1,13 +1,14 @@
|
||||||
import sqlalchemy as sa
|
|
||||||
from mealie.db.models.model_base import SqlAlchemyBase
|
from mealie.db.models.model_base import SqlAlchemyBase
|
||||||
|
from sqlalchemy import Column, ForeignKey, Integer, String
|
||||||
|
|
||||||
|
|
||||||
class RecipeIngredient(SqlAlchemyBase):
|
class RecipeIngredient(SqlAlchemyBase):
|
||||||
__tablename__ = "recipes_ingredients"
|
__tablename__ = "recipes_ingredients"
|
||||||
id = sa.Column(sa.Integer, primary_key=True)
|
id = Column(Integer, primary_key=True)
|
||||||
position = sa.Column(sa.Integer)
|
position = Column(Integer)
|
||||||
parent_id = sa.Column(sa.Integer, sa.ForeignKey("recipes.id"))
|
parent_id = Column(Integer, ForeignKey("recipes.id"))
|
||||||
ingredient = sa.Column(sa.String)
|
# title = Column(String)
|
||||||
|
ingredient = Column(String)
|
||||||
|
|
||||||
def update(self, ingredient):
|
def update(self, ingredient):
|
||||||
self.ingredient = ingredient
|
self.ingredient = ingredient
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import sqlalchemy as sa
|
|
||||||
from mealie.db.models.model_base import SqlAlchemyBase
|
from mealie.db.models.model_base import SqlAlchemyBase
|
||||||
|
from sqlalchemy import Column, ForeignKey, Integer, String
|
||||||
|
|
||||||
|
|
||||||
class RecipeInstruction(SqlAlchemyBase):
|
class RecipeInstruction(SqlAlchemyBase):
|
||||||
__tablename__ = "recipe_instructions"
|
__tablename__ = "recipe_instructions"
|
||||||
id = sa.Column(sa.Integer, primary_key=True)
|
id = Column(Integer, primary_key=True)
|
||||||
parent_id = sa.Column(sa.Integer, sa.ForeignKey("recipes.id"))
|
parent_id = Column(Integer, ForeignKey("recipes.id"))
|
||||||
position = sa.Column(sa.Integer)
|
position = Column(Integer)
|
||||||
type = sa.Column(sa.String, default="")
|
type = Column(String, default="")
|
||||||
text = sa.Column(sa.String)
|
title = Column(String)
|
||||||
title = sa.Column(sa.String)
|
text = Column(String)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue