"""field_notes.page_context — SPA route a capture/comment was made from.

V2-only column (allowlisted in scripts/canonical.py). Added for the
kind='feedback' app-feedback flow: rian captures voice/text feedback while
acceptance-testing and the note records which page he was on.

Revision ID: a7c2f19e4b02
Revises: 1bec465da1e1
Create Date: 2026-07-03
"""
from __future__ import annotations

import sqlalchemy as sa
from alembic import op

revision = "a7c2f19e4b02"
down_revision = "1bec465da1e1"
branch_labels = None
depends_on = None


def upgrade() -> None:
    op.add_column(
        "field_notes",
        sa.Column("page_context", sa.Text(), nullable=True, server_default=sa.text("''")),
    )


def downgrade() -> None:
    op.drop_column("field_notes", "page_context")
