"""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")
