"""Add indices

Revision ID: 791ce783d3d8
Revises: 969d84257cac
Create Date: 2025-06-03 09:32:30.757651

"""
from alembic import op


# revision identifiers, used by Alembic.
revision = "791ce783d3d8"
down_revision = "969d84257cac"
branch_labels = None
depends_on = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("historyimagecache", schema=None) as batch_op:
        batch_op.create_index(
            batch_op.f("ix_historyimagecache_dataset_id"),
            ["dataset_id"],
            unique=False,
        )
        batch_op.create_index(
            batch_op.f("ix_historyimagecache_workflowtask_id"),
            ["workflowtask_id"],
            unique=False,
        )

    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("historyimagecache", schema=None) as batch_op:
        batch_op.drop_index(batch_op.f("ix_historyimagecache_workflowtask_id"))
        batch_op.drop_index(batch_op.f("ix_historyimagecache_dataset_id"))

    # ### end Alembic commands ###
