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:
1 parent
d7c491ec22
commit
935f5bd85b
1 file changed
+4
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user