diff --git a/surfsense_backend/alembic/versions/144_add_automation_tables.py b/surfsense_backend/alembic/versions/144_add_automation_tables.py index 6aa208dc1..acfa3db77 100644 --- a/surfsense_backend/alembic/versions/144_add_automation_tables.py +++ b/surfsense_backend/alembic/versions/144_add_automation_tables.py @@ -125,7 +125,6 @@ def upgrade() -> None: error JSONB, started_at TIMESTAMP WITH TIME ZONE, finished_at TIMESTAMP WITH TIME ZONE, - agent_session_id VARCHAR(200), created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW() ); """ diff --git a/surfsense_backend/app/automations/persistence/models/run.py b/surfsense_backend/app/automations/persistence/models/run.py index 9291e5da0..43a1de07d 100644 --- a/surfsense_backend/app/automations/persistence/models/run.py +++ b/surfsense_backend/app/automations/persistence/models/run.py @@ -1,4 +1,9 @@ -"""``automation_runs`` table — immutable per-fire execution record.""" +"""``automation_runs`` table — immutable per-fire execution record. + +Per-step metadata (incl. any LangGraph session id for an ``agent_task`` step) +lives inside ``step_results[i]``, since a single run may contain zero, one, +or N agent steps. +""" from __future__ import annotations @@ -8,7 +13,6 @@ from sqlalchemy import ( Enum as SQLAlchemyEnum, ForeignKey, Integer, - String, ) from sqlalchemy.dialects.postgresql import JSONB @@ -54,5 +58,3 @@ class AutomationRun(BaseModel, TimestampMixin): started_at = Column(TIMESTAMP(timezone=True), nullable=True) finished_at = Column(TIMESTAMP(timezone=True), nullable=True) - - agent_session_id = Column(String(200), nullable=True)