"""Index emails

Revision ID: a5d97318b751
Revises: a155bf913e34
Create Date: 2016-12-06 21:58:44.093363

"""

# revision identifiers, used by Alembic.
revision = 'a5d97318b751'
down_revision = 'a155bf913e34'

from alembic import op
import sqlalchemy as sa


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_index(op.f('ix_user_email'), 'user', ['email'], unique=True)
    op.drop_constraint('user_email_key', 'user', type_='unique')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_unique_constraint('user_email_key', 'user', ['email'])
    op.drop_index(op.f('ix_user_email'), table_name='user')
    # ### end Alembic commands ###
