"""added username_lcase

Revision: 0008
Revision ID: 2075f8467bf0
Revises: 4ce0659a41fd
Create Date: 2015-06-16 23:04:28.403511

"""

# revision identifiers, used by Alembic.
revision = '2075f8467bf0'
down_revision = '4ce0659a41fd'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column('users', sa.Column('username_lcase', sa.String(), nullable=True))
    op.drop_constraint('users_username_key', 'users', type_='unique')
    op.create_unique_constraint(None, 'users', ['username_lcase'])
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'users', type_='unique')
    op.create_unique_constraint('users_username_key', 'users', ['username'])
    op.drop_column('users', 'username_lcase')
    ### end Alembic commands ###
