From 935f5bd85bc6bc82159725e452f0ee7880aa73de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Stach?= Date: Fri, 9 Oct 2026 22:54:09 +0200 Subject: [PATCH] fix: delete stale golf.db to match new schema Co-authored-by: aider (openrouter/thinkingmachines/inkling-small:free) --- backend/app.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/app.py b/backend/app.py index 4bc3a8c..899d565 100644 --- a/backend/app.py +++ b/backend/app.py @@ -82,6 +82,10 @@ HoleScore.round = relationship("Round", back_populates="hole_scores") HoleScore.putts = relationship("Putt", back_populates="hole_score") 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) app = FastAPI()