"""add index into vulnerability

Revision ID: 99a740945c44
Revises: f82a9136c408
Create Date: 2022-07-25 20:17:02.992056+00:00

"""
from alembic import op

# revision identifiers, used by Alembic.
revision = '99a740945c44'
down_revision = 'f82a9136c408'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_index('ix_vulnerability_severity_hostid_serviceid', 'vulnerability', ['severity', 'host_id', 'service_id'], unique=False)
    op.create_index(op.f('ix_vulnerability_severity'), 'vulnerability', ['severity'], unique=False)
    op.create_index(op.f('ix_vulnerability_template_severity'), 'vulnerability_template', ['severity'], unique=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_vulnerability_template_severity'), table_name='vulnerability_template')
    op.drop_index(op.f('ix_vulnerability_severity'), table_name='vulnerability')
    op.drop_index('ix_vulnerability_severity_hostid_serviceid', table_name='vulnerability')
    # ### end Alembic commands ###
