"""remove unique from Sessions table

Revision ID: 6675fd9dfe42
Revises: 7520a89a8467
Create Date: 2024-12-29 16:26:29.871839

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
import sqlmodel
import sqlmodel.sql.sqltypes


# revision identifiers, used by Alembic.
revision: str = '6675fd9dfe42'
down_revision: Union[str, None] = '7520a89a8467'
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! ###
    with op.batch_alter_table('sessions', schema=None) as batch_op:
        batch_op.drop_constraint('sessions_shortname_key', type_='unique')

    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('sessions', schema=None) as batch_op:
        batch_op.create_unique_constraint('sessions_shortname_key', ['shortname'])

    # ### end Alembic commands ###
