"""add secret token

Revision ID: b2e071ae215a
Revises: d096f9d0b612
Create Date: 2026-03-10 11:51:02.385582

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = 'b2e071ae215a'
down_revision: Union[str, Sequence[str], None] = 'd096f9d0b612'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    """Upgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('tickets', sa.Column('secret_token', sa.String(), nullable=True))
    op.create_index(op.f('ix_tickets_secret_token'), 'tickets', ['secret_token'], unique=True)
    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_tickets_secret_token'), table_name='tickets')
    op.drop_column('tickets', 'secret_token')
    # ### end Alembic commands ###
