"""Add a number of missing indexes

Revision ID: bcfdb271b88d
Revises: adcd1577f301
Create Date: 2022-04-21 17:45:09.787769

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'bcfdb271b88d'
down_revision = 'adcd1577f301'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_index(op.f('ix_attachment_comment_id'), 'attachment', ['comment_id'], unique=False)
    op.create_index(op.f('ix_notification_owner_id'), 'notification', ['owner_id'], unique=False)
    op.create_index(op.f('ix_pollanswer_poll_id'), 'pollanswer', ['poll_id'], unique=False)
    op.create_index(op.f('ix_post_author_id'), 'post', ['author_id'], unique=False)
    op.create_index(op.f('ix_post_date_modified'), 'post', ['date_modified'], unique=False)
    op.create_index(op.f('ix_topic_forum_id'), 'topic', ['forum_id'], unique=False)
    op.create_index(op.f('ix_trophy_member_uid'), 'trophy_member', ['uid'], unique=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_trophy_member_uid'), table_name='trophy_member')
    op.drop_index(op.f('ix_topic_forum_id'), table_name='topic')
    op.drop_index(op.f('ix_post_date_modified'), table_name='post')
    op.drop_index(op.f('ix_post_author_id'), table_name='post')
    op.drop_index(op.f('ix_pollanswer_poll_id'), table_name='pollanswer')
    op.drop_index(op.f('ix_notification_owner_id'), table_name='notification')
    op.drop_index(op.f('ix_attachment_comment_id'), table_name='attachment')
    # ### end Alembic commands ###
