"""empty message

Revision ID: 4da21f1d702a
Revises: 1a45abbc3682
Create Date: 2015-09-21 23:19:45.737008

"""

# revision identifiers, used by Alembic.
revision = '4da21f1d702a'
down_revision = '1a45abbc3682'

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_unique_constraint(None, 'role_users', ['user_id', 'role_id'])
    op.create_unique_constraint(None, 'user_expertise_domains', ['user_id', 'name'])
    op.create_unique_constraint(None, 'user_languages', ['user_id', 'locale'])
    op.create_unique_constraint(None, 'user_skills', ['user_id', 'name'])
    op.alter_column('users', 'deployment',
               existing_type=sa.VARCHAR(),
               nullable=False)
    op.create_unique_constraint(None, 'users', ['deployment', 'email'])
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'users', type_='unique')
    op.alter_column('users', 'deployment',
               existing_type=sa.VARCHAR(),
               nullable=True)
    op.drop_constraint(None, 'user_skills', type_='unique')
    op.drop_constraint(None, 'user_languages', type_='unique')
    op.drop_constraint(None, 'user_expertise_domains', type_='unique')
    op.drop_constraint(None, 'role_users', type_='unique')
    ### end Alembic commands ###
