From 0fdb760bc1222951692d4d92835f4b04e7a79c88 Mon Sep 17 00:00:00 2001 From: Tyler Date: Fri, 19 Jun 2026 21:36:26 -0600 Subject: [PATCH] docs(backend): update db.py docstring to reflect migrations-first order --- backend/src/cyclone/db.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/src/cyclone/db.py b/backend/src/cyclone/db.py index a64f9c2..f6ff401 100644 --- a/backend/src/cyclone/db.py +++ b/backend/src/cyclone/db.py @@ -2,9 +2,10 @@ `init_db()` is called from `cyclone.__main__:serve` before uvicorn starts. It reads `CYCLONE_DB_URL` (default `sqlite:///~/.local/share/cyclone/cyclone.db`), -creates the engine, runs `Base.metadata.create_all`, then runs the migration -runner. Calling `init_db()` is idempotent — calling it twice on the same URL -re-uses the same engine. +creates the engine, runs the migration runner, then runs `Base.metadata.create_all` +as a safety net (which is a no-op when the migration is current). Calling +`init_db()` is idempotent — calling it twice on the same URL re-uses the +same engine. """ from __future__ import annotations