"""Add productionversionschedule uc

Revision ID: 26f96f65cfa3
Revises: 3d8e68dffeee
Create Date: 2025-07-18 11:49:59.302576

"""

from alembic import op


# revision identifiers, used by Alembic.
revision = "26f96f65cfa3"
down_revision = "3d8e68dffeee"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table(
        "production_schedule_version", schema=None
    ) as batch_op:
        batch_op.create_unique_constraint(
            "production_schedule_version_uc", ["name", "project_id"]
        )

    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table(
        "production_schedule_version", schema=None
    ) as batch_op:
        batch_op.drop_constraint(
            "production_schedule_version_uc", type_="unique"
        )

    # ### end Alembic commands ###
