"""added_indexes

Revision: 0019
Revision ID: 74bc667256f
Revises: 355b90f95fc4
Create Date: 2015-08-21 14:14:32.313427

"""

# revision identifiers, used by Alembic.
revision = '74bc667256f'
down_revision = '355b90f95fc4'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_index(op.f('ix_board_template_lists_board_template_id'), 'board_template_lists', ['board_template_id'], unique=False)
    op.create_index(op.f('ix_board_templates_owner_id'), 'board_templates', ['owner_id'], unique=False)
    op.create_index(op.f('ix_card_attributes_card_id'), 'card_attributes', ['card_id'], unique=False)
    op.create_index(op.f('ix_card_behaviors_card_id'), 'card_behaviors', ['card_id'], unique=False)
    op.create_index(op.f('ix_card_lists_parent_id'), 'card_lists', ['parent_id'], unique=False)
    op.create_index(op.f('ix_card_members_card_id'), 'card_members', ['card_id'], unique=False)
    op.create_index(op.f('ix_card_members_permission'), 'card_members', ['permission'], unique=False)
    op.create_index(op.f('ix_card_members_user_id'), 'card_members', ['user_id'], unique=False)
    op.create_index(op.f('ix_card_model_attributes_card_id'), 'card_model_attributes', ['card_id'], unique=False)
    op.create_index(op.f('ix_card_model_attributes_card_model_id'), 'card_model_attributes', ['card_model_id'], unique=False)
    op.create_index(op.f('ix_card_models_copied_from_id'), 'card_models', ['copied_from_id'], unique=False)
    op.create_index(op.f('ix_card_models_extends_id'), 'card_models', ['extends_id'], unique=False)
    op.create_index(op.f('ix_card_models_owner_id'), 'card_models', ['owner_id'], unique=False)
    op.create_index(op.f('ix_card_subscriptions_card_id'), 'card_subscriptions', ['card_id'], unique=False)
    op.create_index(op.f('ix_card_subscriptions_user_id'), 'card_subscriptions', ['user_id'], unique=False)
    op.create_index(op.f('ix_cards_list_id'), 'cards', ['list_id'], unique=False)
    op.create_index(op.f('ix_cards_milestone_id'), 'cards', ['milestone_id'], unique=False)
    op.create_index(op.f('ix_cards_owner_id'), 'cards', ['owner_id'], unique=False)
    op.create_index(op.f('ix_cards_parent_id'), 'cards', ['parent_id'], unique=False)
    op.create_index(op.f('ix_invites_card_id'), 'invites', ['card_id'], unique=False)
    op.create_index(op.f('ix_invites_org_id'), 'invites', ['org_id'], unique=False)
    op.create_index(op.f('ix_milestones_parent_id'), 'milestones', ['parent_id'], unique=False)
    op.create_index(op.f('ix_organization_members_org_id'), 'organization_members', ['org_id'], unique=False)
    op.create_index(op.f('ix_organization_members_permission'), 'organization_members', ['permission'], unique=False)
    op.create_index(op.f('ix_organization_members_user_id'), 'organization_members', ['user_id'], unique=False)
    op.create_index(op.f('ix_organizations_is_user_org'), 'organizations', ['is_user_org'], unique=False)
    op.create_index(op.f('ix_stream_card_id'), 'stream', ['card_id'], unique=False)
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_stream_card_id'), table_name='stream')
    op.drop_index(op.f('ix_organizations_is_user_org'), table_name='organizations')
    op.drop_index(op.f('ix_organization_members_user_id'), table_name='organization_members')
    op.drop_index(op.f('ix_organization_members_permission'), table_name='organization_members')
    op.drop_index(op.f('ix_organization_members_org_id'), table_name='organization_members')
    op.drop_index(op.f('ix_milestones_parent_id'), table_name='milestones')
    op.drop_index(op.f('ix_invites_org_id'), table_name='invites')
    op.drop_index(op.f('ix_invites_card_id'), table_name='invites')
    op.drop_index(op.f('ix_cards_parent_id'), table_name='cards')
    op.drop_index(op.f('ix_cards_owner_id'), table_name='cards')
    op.drop_index(op.f('ix_cards_milestone_id'), table_name='cards')
    op.drop_index(op.f('ix_cards_list_id'), table_name='cards')
    op.drop_index(op.f('ix_card_subscriptions_user_id'), table_name='card_subscriptions')
    op.drop_index(op.f('ix_card_subscriptions_card_id'), table_name='card_subscriptions')
    op.drop_index(op.f('ix_card_models_owner_id'), table_name='card_models')
    op.drop_index(op.f('ix_card_models_extends_id'), table_name='card_models')
    op.drop_index(op.f('ix_card_models_copied_from_id'), table_name='card_models')
    op.drop_index(op.f('ix_card_model_attributes_card_model_id'), table_name='card_model_attributes')
    op.drop_index(op.f('ix_card_model_attributes_card_id'), table_name='card_model_attributes')
    op.drop_index(op.f('ix_card_members_user_id'), table_name='card_members')
    op.drop_index(op.f('ix_card_members_permission'), table_name='card_members')
    op.drop_index(op.f('ix_card_members_card_id'), table_name='card_members')
    op.drop_index(op.f('ix_card_lists_parent_id'), table_name='card_lists')
    op.drop_index(op.f('ix_card_behaviors_card_id'), table_name='card_behaviors')
    op.drop_index(op.f('ix_card_attributes_card_id'), table_name='card_attributes')
    op.drop_index(op.f('ix_board_templates_owner_id'), table_name='board_templates')
    op.drop_index(op.f('ix_board_template_lists_board_template_id'), table_name='board_template_lists')
    ### end Alembic commands ###
