"""Removed unique constraint on ATAK plugin names

Revision ID: eaf2af6f6b22
Revises: 8d6f811f4fd7
Create Date: 2025-11-08 16:28:41.700279

"""

import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "eaf2af6f6b22"
down_revision = "8d6f811f4fd7"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    try:
        with op.batch_alter_table("packages", schema=None) as batch_op:
            batch_op.drop_constraint(batch_op.f("packages_package_name_key"), type_="unique")
    except BaseException as e:
        print(e)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("packages", schema=None) as batch_op:
        batch_op.create_unique_constraint(batch_op.f("packages_package_name_key"), ["package_name"])

    # ### end Alembic commands ###
