chrysopedia/alembic/versions/006_debug_columns.py
jlightner 4b0914b12b fix: restore complete project tree from ub01 canonical state
Auto-mode commit 7aa33cd accidentally deleted 78 files (14,814 lines) during M005
execution. Subsequent commits rebuilt some frontend files but backend/, alembic/,
tests/, whisper/, docker configs, and prompts were never restored in this repo.

This commit restores the full project tree by syncing from ub01's working directory,
which has all M001-M007 features running in production containers.

Restored: backend/ (config, models, routers, database, redis, search_service, worker),
alembic/ (6 migrations), docker/ (Dockerfiles, nginx, compose), prompts/ (4 stages),
tests/, whisper/, README.md, .env.example, chrysopedia-spec.md
2026-03-31 02:10:41 +00:00

33 lines
847 B
Python

"""Add debug LLM I/O capture columns to pipeline_events.
Revision ID: 006_debug_columns
Revises: 005_content_hash
"""
from alembic import op
import sqlalchemy as sa
revision = "006_debug_columns"
down_revision = "005_content_hash"
branch_labels = None
depends_on = None
def upgrade() -> None:
op.add_column(
"pipeline_events",
sa.Column("system_prompt_text", sa.Text(), nullable=True),
)
op.add_column(
"pipeline_events",
sa.Column("user_prompt_text", sa.Text(), nullable=True),
)
op.add_column(
"pipeline_events",
sa.Column("response_text", sa.Text(), nullable=True),
)
def downgrade() -> None:
op.drop_column("pipeline_events", "response_text")
op.drop_column("pipeline_events", "user_prompt_text")
op.drop_column("pipeline_events", "system_prompt_text")