generated from coulomb/repo-seed
SQLAlchemy ORM (src/activity_core/orm.py):
- ActivityDefinition, ActivityRun, TaskInstance mapped to Base.metadata
- Wired into migrations/env.py for autogenerate support
Migrations (chained 0001 → 0002 → 0003):
- 0001: activity_definitions (id, name, enabled, trigger_type,
trigger_config JSONB, context_sources JSONB, task_templates JSONB,
dedupe_key_strategy, version, created_at, updated_at)
- 0002: activity_runs (run_id, activity_id FK→activity_definitions,
scheduled_for, fired_at, context_snapshot JSONB, tasks_spawned,
version_used) + index on activity_id
- 0003: task_instances (id, run_id FK→activity_runs CASCADE,
type, params JSONB, status, created_at) + index on run_id
Apply with: ACTCORE_DB_URL=... alembic upgrade head
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Generic single-database configuration with an async dbapi.