"""Remove unicity on username

Revision ID: f77c8ed4da10
Revises: bb8a227f53be
Create Date: 2025-05-15 13:58:50.656013

"""

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = "f77c8ed4da10"
down_revision: Union[str, None] = "bb8a227f53be"
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.drop_constraint("users_username_key", "users", type_="unique")
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_unique_constraint("users_username_key", "users", ["username"])
    # ### end Alembic commands ###
