"""add_restriction_columns_to_feature_options

Revision ID: 3c1144eb8450
Revises: 44625108aa55
Create Date: 2026-09-01 16:20:31.200661

"""
from typing import Sequence, Union

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

# revision identifiers, used by Alembic.
revision: str = '3c1144eb8450'
down_revision: Union[str, None] = '44625108aa55'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.execute("ALTER TABLE special_feature_option_master ADD COLUMN IF NOT EXISTS restricted_model_ids JSONB")
    op.execute("ALTER TABLE special_feature_option_master ADD COLUMN IF NOT EXISTS restricted_body_type_ids JSONB")
    op.execute("ALTER TABLE special_feature_option_master ADD COLUMN IF NOT EXISTS restricted_segment_ids JSONB")
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('special_feature_option_master', 'restricted_segment_ids')
    op.drop_column('special_feature_option_master', 'restricted_body_type_ids')
    op.drop_column('special_feature_option_master', 'restricted_model_ids')
    # ### end Alembic commands ###
