"""Add indexes to some tables.

Revision ID: 717a525b2193
Revises: d5b228dcb625
Create Date: 2017-03-03 23:31:42.062641

"""
from alembic import op


# revision identifiers, used by Alembic.
revision = '717a525b2193'
down_revision = 'd5b228dcb625'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_index(op.f('ix_card_userid'), 'card', ['userid'], unique=False)
    op.create_index(op.f('ix_music_game'), 'music', ['game'], unique=False)
    op.create_index(op.f('ix_music_version'), 'music', ['version'], unique=False)
    op.create_index(op.f('ix_news_timestamp'), 'news', ['timestamp'], unique=False)
    op.create_index(op.f('ix_score_musicid'), 'score', ['musicid'], unique=False)
    op.create_index(op.f('ix_score_history_musicid'), 'score_history', ['musicid'], unique=False)
    op.create_index(op.f('ix_score_history_timestamp'), 'score_history', ['timestamp'], unique=False)
    op.create_index(op.f('ix_time_sensitive_settings_end_time'), 'time_sensitive_settings', ['end_time'], unique=False)
    op.create_index(op.f('ix_time_sensitive_settings_start_time'), 'time_sensitive_settings', ['start_time'], unique=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_time_sensitive_settings_start_time'), table_name='time_sensitive_settings')
    op.drop_index(op.f('ix_time_sensitive_settings_end_time'), table_name='time_sensitive_settings')
    op.drop_index(op.f('ix_score_history_timestamp'), table_name='score_history')
    op.drop_index(op.f('ix_score_history_musicid'), table_name='score_history')
    op.drop_index(op.f('ix_score_musicid'), table_name='score')
    op.drop_index(op.f('ix_news_timestamp'), table_name='news')
    op.drop_index(op.f('ix_music_version'), table_name='music')
    op.drop_index(op.f('ix_music_game'), table_name='music')
    op.drop_index(op.f('ix_card_userid'), table_name='card')
    # ### end Alembic commands ###
