"""add hidden to profile item

Revision ID: 9f3a0c3aebe0
Revises: d7a8e2f1b3c9
Create Date: 2026-01-21 05:00:35.223839

"""

from alembic import op
import sqlalchemy as sa

# revision identifiers, used by Alembic.
revision = "9f3a0c3aebe0"
down_revision = "d7a8e2f1b3c9"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("profile_item", schema=None) as batch_op:
        batch_op.add_column(
            sa.Column(
                "is_hidden",
                sa.SmallInteger(),
                nullable=False,
                server_default=sa.text("0"),
                comment="Hidden flag: 0=visible, 1=hidden (custom variables only)",
            )
        )
        batch_op.create_index(
            batch_op.f("ix_profile_item_is_hidden"), ["is_hidden"], unique=False
        )


# ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("profile_item", schema=None) as batch_op:
        batch_op.drop_index(batch_op.f("ix_profile_item_is_hidden"))
        batch_op.drop_column("is_hidden")

    # ### end Alembic commands ###
