Add SQLAlchemy persistence layer
This commit is contained in:
@@ -28,9 +28,9 @@
|
||||
|
||||
## Package C: Persistence
|
||||
|
||||
- [ ] SQLAlchemy models
|
||||
- [ ] repositories for PostgreSQL/SQLite
|
||||
- [ ] migrations
|
||||
- [x] SQLAlchemy models
|
||||
- [x] repositories for PostgreSQL/SQLite
|
||||
- [x] migrations
|
||||
- [ ] artifact metadata persistence
|
||||
- [ ] event store queries with pagination
|
||||
|
||||
|
||||
@@ -5,6 +5,19 @@
|
||||
- production: PostgreSQL
|
||||
- local development: SQLite
|
||||
|
||||
## Persistence Path In Code
|
||||
|
||||
SQLAlchemy adapter реализован в:
|
||||
|
||||
- [src/ai_orchestrator/infrastructure/storage/sqlalchemy.py](/Z:/codex/ai_orchestrator/src/ai_orchestrator/infrastructure/storage/sqlalchemy.py)
|
||||
- [src/ai_orchestrator/infrastructure/storage/factory.py](/Z:/codex/ai_orchestrator/src/ai_orchestrator/infrastructure/storage/factory.py)
|
||||
|
||||
Migration skeleton:
|
||||
|
||||
- [alembic.ini](/Z:/codex/ai_orchestrator/alembic.ini)
|
||||
- [migrations/env.py](/Z:/codex/ai_orchestrator/migrations/env.py)
|
||||
- [migrations/versions/0001_initial_schema.py](/Z:/codex/ai_orchestrator/migrations/versions/0001_initial_schema.py)
|
||||
|
||||
## Tables
|
||||
|
||||
### projects
|
||||
@@ -156,3 +169,8 @@
|
||||
- `confirmations(status, created_at)`
|
||||
- `worker_sessions(status, last_heartbeat_at)`
|
||||
|
||||
## Active Adapter Strategy
|
||||
|
||||
- `memory` backend остается для быстрых unit/integration прогонов;
|
||||
- `sqlite` backend предназначен для локального development без Docker;
|
||||
- `postgres` backend является production target.
|
||||
|
||||
Reference in New Issue
Block a user