"""add options_json to attribute_def

Revision ID: 0004_attribute_def_options_json
Revises: 0003_dedupe_attribute_discovery
Create Date: 2026-01-24 00:35:00.000000
"""

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql


revision = "0004_attribute_def_options_json"
down_revision = "0003_dedupe_attribute_discovery"
branch_labels = None
depends_on = None


def upgrade() -> None:
    op.add_column(
        "attribute_def",
        sa.Column("options_json", postgresql.JSONB(astext_type=sa.Text())),
    )


def downgrade() -> None:
    op.drop_column("attribute_def", "options_json")
