SurfSense/surfsense_backend/alembic
CREDO23 d9183464d9 feat(automation): add Alembic migration for the three automation tables
Migration 144 -> 143. Matches the SQLAlchemy models added in commit 7
and the v1 data model in automation-design-plan.md §9.

Up:
  - CREATE TYPE automation_status / automation_trigger_type /
    automation_run_status (PostgreSQL ENUMs created first because the
    tables reference them).
  - CREATE TABLE automations with FK to searchspaces (CASCADE) and
    user (SET NULL); five indexes matching the SQLAlchemy model.
  - CREATE TABLE automation_triggers with FK to automations
    (CASCADE); four indexes.
  - CREATE TABLE automation_runs with FK to automations (CASCADE) and
    automation_triggers (SET NULL — null trigger_id == manual via UI);
    four indexes.

Down: drops every index, table, and ENUM in reverse-dependency order
so the migration is reversible without ON DELETE side effects.

Verified: `alembic history` resolves 143 -> 144 (head) cleanly.

domain_events (Phase 3) and mcp_connections / mcp_tools (Phase 4) ship
in their own migrations when the consuming feature lands; this
migration only covers the three v1 tables.
2026-05-26 22:44:33 +02:00
..
versions feat(automation): add Alembic migration for the three automation tables 2026-05-26 22:44:33 +02:00
env.py chore: enhance E2E tests workflow by adding caching for Next.js build and updating test command 2026-05-10 22:21:06 +05:30
README add github connector, add alembic for db migrations, fix bug updating connectors 2025-04-13 13:56:22 -07:00
script.py.mako add github connector, add alembic for db migrations, fix bug updating connectors 2025-04-13 13:56:22 -07:00

Generic single-database configuration with an async dbapi.