"""fix_workflow_version_idx

Revision ID: 001
Revises: 000
Create Date: 2025-01-06 20:47:53.181743

"""

from typing import Sequence, Union

import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision: str = "001"
down_revision: Union[str, None] = "000"
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_index("ix_workflow_versions_version", table_name="workflow_versions")
    op.create_index(
        op.f("ix_workflow_versions_version"),
        "workflow_versions",
        ["version"],
        unique=False,
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f("ix_workflow_versions_version"), table_name="workflow_versions")
    op.create_index(
        "ix_workflow_versions_version",
        "workflow_versions",
        ["version"],
        unique=True,
    )
    # ### end Alembic commands ###
