"""Add missing indexes.

Revision ID: 32e8060589b8
Revises: a3fe8c8a344
Create Date: 2014-02-11 17:21:00.718449

"""

# revision identifiers, used by Alembic.
revision = '32e8060589b8'
down_revision = 'a3fe8c8a344'

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_index('ix_group_created_at', 'group', ['created_at'], unique=False)
    op.create_index('ix_grouprequest_created_at', 'grouprequest', ['created_at'], unique=False)
    op.create_index('ix_grouprequest_from_user_id', 'grouprequest', ['from_user_id'], unique=False)
    op.create_index('ix_grouprequest_project_id', 'grouprequest', ['project_id'], unique=False)
    op.create_index('ix_grouprequest_to_user_id', 'grouprequest', ['to_user_id'], unique=False)
    op.create_index('ix_testableresult_created_at', 'testableresult', ['created_at'], unique=False)
    op.create_index('ix_user_to_group_group_id', 'user_to_group', ['group_id'], unique=False)
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_index('ix_user_to_group_group_id', table_name='user_to_group')
    op.drop_index('ix_testableresult_created_at', table_name='testableresult')
    op.drop_index('ix_grouprequest_to_user_id', table_name='grouprequest')
    op.drop_index('ix_grouprequest_project_id', table_name='grouprequest')
    op.drop_index('ix_grouprequest_from_user_id', table_name='grouprequest')
    op.drop_index('ix_grouprequest_created_at', table_name='grouprequest')
    op.drop_index('ix_group_created_at', table_name='group')
    ### end Alembic commands ###
