"""Exempt/variant reason codes — a small fixed catalogue beside the prose (#2874, milestone 294)

Revision ID: 0083
Revises: 0082
Create Date: 2026-08-21

The 2026-08 audit wrote the same free-text reason thousands of times
("scoped rule — styles one element of this view"); a judgment's WHY stays
prose, but an optional code from a fixed catalogue makes the ledger
filterable and aggregable ("how many pure helpers, how many test helpers").
"""
import sqlalchemy as sa
from alembic import op

revision = "0083"
down_revision = "0082"
branch_labels = None
depends_on = None


def upgrade() -> None:
    op.add_column("code_shapes", sa.Column("reason_code", sa.Text(), nullable=True))


def downgrade() -> None:
    op.drop_column("code_shapes", "reason_code")
