- alembic.ini: remove hardcoded sqlite URL - alembic/env.py: inject DATABASE_URL from container env - main.py: serialize Base.metadata.create_all() + setup_pgvector() behind a Postgres advisory lock (_run_startup_ddl). Previously all 4 uvicorn workers ran the DDL in parallel and occasionally deadlocked each other on ALTER TABLE ordering, killing one worker at startup. - CLAUDE.md: add Database migrations (Alembic) section DB was stamped at 9bac7bf02e38; no schema changes in this commit. |
||
|---|---|---|
| .. | ||
| middleware | ||
| models | ||
| routers | ||
| schemas | ||
| services | ||
| tasks | ||
| utils | ||
| __init__.py | ||
| cli.py | ||
| config.py | ||
| database.py | ||
| logging_config.py | ||
| main.py | ||