"""empty message

Revision ID: 565cb2af7fa3
Revises: 59521a50becc
Create Date: 2016-04-13 17:56:39.730000

"""

# revision identifiers, used by Alembic.
revision = '565cb2af7fa3'
down_revision = '59521a50becc'

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('waitlist_groups',
    sa.Column('groupID', sa.Integer(), nullable=False),
    sa.Column('groupName', sa.String(length=50), nullable=False),
    sa.Column('displayName', sa.String(length=50), nullable=False),
    sa.Column('xupwlID', sa.Integer(), nullable=False),
    sa.Column('logiwlID', sa.Integer(), nullable=False),
    sa.Column('dpswlID', sa.Integer(), nullable=False),
    sa.Column('sniperwlID', sa.Integer(), nullable=False),
    sa.Column('otherwlID', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['dpswlID'], [u'waitlists.id'], ),
    sa.ForeignKeyConstraint(['logiwlID'], [u'waitlists.id'], ),
    sa.ForeignKeyConstraint(['otherwlID'], [u'waitlists.id'], ),
    sa.ForeignKeyConstraint(['sniperwlID'], [u'waitlists.id'], ),
    sa.ForeignKeyConstraint(['xupwlID'], [u'waitlists.id'], ),
    sa.PrimaryKeyConstraint('groupID'),
    sa.UniqueConstraint('displayName'),
    sa.UniqueConstraint('groupName')
    )
    op.add_column(u'waitlists', sa.Column('groupID', sa.Integer(), nullable=True))
    op.create_foreign_key(None, 'waitlists', 'waitlist_groups', ['groupID'], ['groupID'])
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'waitlists', type_='foreignkey')
    op.drop_column(u'waitlists', 'groupID')
    op.drop_table('waitlist_groups')
    ### end Alembic commands ###
