"""added compiler q indexes

Peek Plugin Database Migration Script

Revision ID: 2fc6d3246717
Revises: 1856b7fb8803
Create Date: 2019-10-11 15:19:48.918248

"""

# revision identifiers, used by Alembic.
revision = "2fc6d3246717"
down_revision = "1856b7fb8803"
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa
import geoalchemy2


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_index(
        "idx_BICompQueue_modelSetId_chunkKey",
        "BranchIndexCompilerQueue",
        ["modelSetId", "chunkKey"],
        unique=False,
        schema="pl_diagram",
    )
    op.create_index(
        "idx_DispCompQueue_dispId",
        "DispCompilerQueue",
        ["dispId"],
        unique=False,
        schema="pl_diagram",
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(
        "idx_DispCompQueue_dispId",
        table_name="DispCompilerQueue",
        schema="pl_diagram",
    )
    op.drop_index(
        "idx_BICompQueue_modelSetId_chunkKey",
        table_name="BranchIndexCompilerQueue",
        schema="pl_diagram",
    )
    # ### end Alembic commands ###
