"""empty message

Revision ID: dfb1b9029365
Revises: 3fa0f5388a6b
Create Date: 2017-01-10 17:03:32.016349

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

# revision identifiers, used by Alembic.
revision = 'dfb1b9029365'
down_revision = '3fa0f5388a6b'
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_checklist')
    op.drop_table('apply_blueprint_classroom')
    op.drop_table('apply_blueprint_email')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('apply_blueprint_email',
    sa.Column('id', sa.INTEGER(), server_default=sa.text(u"nextval('apply_blueprint_email_id_seq'::regclass)"), 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'),
    postgresql_ignore_search_path=False
    )
    op.create_table('apply_blueprint_classroom',
    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('school_id', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('tc_classroom_id', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('name', sa.VARCHAR(length=120), autoincrement=False, nullable=True),
    sa.ForeignKeyConstraint(['school_id'], [u'apply_blueprint_school.id'], name=u'apply_blueprint_classroom_school_id_fkey'),
    sa.PrimaryKeyConstraint('id', name=u'apply_blueprint_classroom_pkey')
    )
    op.create_table('apply_blueprint_checklist',
    sa.Column('date_created', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('date_modified', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('id', sa.INTEGER(), nullable=False),
    sa.Column('guid', sa.VARCHAR(length=36), autoincrement=False, nullable=True),
    sa.Column('school_id', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('child_visit_scheduled_at', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('parent_observation_scheduled_at', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('parent_teacher_conversation_scheduled_at', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('status', postgresql.ENUM(u'New Application', u'Offer Accepted', u'In Process', u'Offer Out', u'Offer Rejected', u'Waitlisted', u'Rejected', name='checklist_status_enum'), autoincrement=False, nullable=True),
    sa.ForeignKeyConstraint(['school_id'], [u'apply_blueprint_school.id'], name=u'apply_blueprint_checklist_school_id_fkey'),
    sa.PrimaryKeyConstraint('id', name=u'apply_blueprint_checklist_pkey')
    )
    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')
    )
    # ### end Alembic commands ###
