"""empty message

Revision ID: be1b1633fc24
Revises: 253a53827eed
Create Date: 2017-01-19 08:35:08.917528

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision = 'be1b1633fc24'
down_revision = '253a53827eed'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('apply_blueprint_email_school')
    op.drop_table('apply_blueprint_email')
    op.add_column('apply_blueprint_school', sa.Column('email', sa.String(length=120), nullable=True))
    op.add_column('apply_blueprint_school', sa.Column('hub', sa.String(length=120), nullable=True))
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('apply_blueprint_school', 'hub')
    op.drop_column('apply_blueprint_school', 'email')
    op.create_table('apply_blueprint_email_school',
    sa.Column('id', sa.INTEGER(), nullable=False),
    sa.Column('date_created', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('date_modified', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('email_id', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('school_id', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.ForeignKeyConstraint(['email_id'], [u'apply_blueprint_email.id'], name=u'apply_blueprint_email_school_email_id_fkey'),
    sa.ForeignKeyConstraint(['school_id'], [u'apply_blueprint_school.id'], name=u'apply_blueprint_email_school_school_id_fkey'),
    sa.PrimaryKeyConstraint('id', name=u'apply_blueprint_email_school_pkey')
    )
    op.create_table('apply_blueprint_email',
    sa.Column('id', sa.INTEGER(), nullable=False),
    sa.Column('date_created', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('date_modified', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('address', sa.VARCHAR(length=120), autoincrement=False, nullable=True),
    sa.PrimaryKeyConstraint('id', name=u'apply_blueprint_email_pkey')
    )
    # ### end Alembic commands ###
