docs(backend): update db.py docstring to reflect migrations-first order
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user