"""drop dead UserProfile curator columns

Revision ID: 0062
Revises: 0061
Create Date: 2026-06-02

learned_summary, observations_raw, and observations_updated_at were written by
the curator/LLM-profile machinery removed in the Phase-8 MCP pivot. Nothing has
populated them since; the profile API returned permanently-empty fields. Drop
the columns.
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql


revision = "0062"
down_revision = "0061"
branch_labels = None
depends_on = None


def upgrade() -> None:
    op.drop_column("user_profiles", "learned_summary")
    op.drop_column("user_profiles", "observations_raw")
    op.drop_column("user_profiles", "observations_updated_at")


def downgrade() -> None:
    op.add_column(
        "user_profiles",
        sa.Column("observations_updated_at", sa.DateTime(timezone=True), nullable=True),
    )
    op.add_column(
        "user_profiles",
        sa.Column("observations_raw", postgresql.JSONB(), nullable=True),
    )
    op.add_column(
        "user_profiles",
        sa.Column("learned_summary", sa.Text(), nullable=True),
    )
