working - moved to compose

This commit is contained in:
2025-08-23 16:06:57 -07:00
parent 6c1fe70fa2
commit 939163806b
13 changed files with 542 additions and 312 deletions

View File

@@ -26,6 +26,7 @@ class Activity(Base):
calories = Column(Integer, nullable=True)
filename = Column(String, unique=True, nullable=True)
downloaded = Column(Boolean, default=False, nullable=False)
reprocessed = Column(Boolean, default=False, nullable=False)
created_at = Column(String, nullable=False)
last_sync = Column(String, nullable=True)
@@ -103,7 +104,7 @@ def init_db():
Returns:
SQLAlchemy engine instance
"""
db_path = os.path.join(os.getenv("DATA_DIR", "data"), "garmin.db")
db_path = os.getenv("DB_PATH", "data/garmin.db")
engine = create_engine(f"sqlite:///{db_path}")
Base.metadata.create_all(engine)
return engine