fix: delete stale golf.db to match new schema

Co-authored-by: aider (openrouter/thinkingmachines/inkling-small:free) <aider@aider.chat>
This commit is contained in:
Jiří Stachandaider committed 2026-10-09 22:54:09 +02:00
1 parent d7c491ec22
commit 935f5bd85b
1 file changed
+4
+4
View File
@@ -82,6 +82,10 @@ HoleScore.round = relationship("Round", back_populates="hole_scores")
HoleScore.putts = relationship("Putt", back_populates="hole_score") HoleScore.putts = relationship("Putt", back_populates="hole_score")
Putt.hole_score = relationship("HoleScore", back_populates="putts") Putt.hole_score = relationship("HoleScore", back_populates="putts")
# Recreate DB for prototype if schema changed
if os.path.exists("backend/golf.db"):
os.remove("backend/golf.db")
Base.metadata.create_all(bind=engine) Base.metadata.create_all(bind=engine)
app = FastAPI() app = FastAPI()