feat(db): init Alembic (async) + SQLAlchemy declarative base — T08
- alembic init -t async migrations - alembic.ini: dev fallback URL postgresql+asyncpg://…:5433/actcore; ACTCORE_DB_URL env var overrides at runtime; src/ added to sys.path - migrations/env.py: reads ACTCORE_DB_URL, wires target_metadata to Base.metadata - src/activity_core/db.py: DeclarativeBase subclass + make_engine() helper Tool choice: Alembic + SQLAlchemy[asyncio] (already declared in pyproject.toml). Migrations run with: ACTCORE_DB_URL=... alembic upgrade head Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c39c32abcd
commit
f55f497107
6 changed files with 266 additions and 1 deletions
1
migrations/README
Normal file
1
migrations/README
Normal file
|
|
@ -0,0 +1 @@
|
|||
Generic single-database configuration with an async dbapi.
|
||||
Loading…
Add table
Add a link
Reference in a new issue