"""make browser_address a unique key in persistent_browser_sessions table

Revision ID: cf6ae2f5013c
Revises: 174dcd456325
Create Date: 2025-12-10 22:11:03.926337+00:00

"""

from typing import Sequence, Union

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "cf6ae2f5013c"
down_revision: Union[str, None] = "174dcd456325"
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.create_unique_constraint(
        "uc_persistent_browser_sessions_browser_address", "persistent_browser_sessions", ["browser_address"]
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint("uc_persistent_browser_sessions_browser_address", "persistent_browser_sessions", type_="unique")
    # ### end Alembic commands ###
