fix charts
This commit is contained in:
@@ -182,6 +182,13 @@ def run_fitness_migrations() -> None:
|
||||
if "step_logs" not in inspector.get_table_names():
|
||||
StepLog.__table__.create(engine, checkfirst=True)
|
||||
|
||||
if "food_logs" in inspector.get_table_names():
|
||||
_add_column_if_missing(
|
||||
"food_logs",
|
||||
"fiber_g",
|
||||
"ALTER TABLE food_logs ADD COLUMN fiber_g FLOAT DEFAULT 0",
|
||||
)
|
||||
|
||||
if "body_metrics" in inspector.get_table_names():
|
||||
_add_column_if_missing(
|
||||
"body_metrics",
|
||||
|
||||
@@ -224,6 +224,7 @@ class FoodLog(Base):
|
||||
protein_g: Mapped[float] = mapped_column(Float, default=0)
|
||||
fat_g: Mapped[float] = mapped_column(Float, default=0)
|
||||
carbs_g: Mapped[float] = mapped_column(Float, default=0)
|
||||
fiber_g: Mapped[float] = mapped_column(Float, default=0)
|
||||
source: Mapped[str] = mapped_column(String(32), default="llm")
|
||||
estimated: Mapped[bool] = mapped_column(Boolean, default=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user