"""Database Migrate

Revision ID: e5bb39593d99
Revises: 
Create Date: 2017-11-09 00:07:36.365603

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'e5bb39593d99'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('Flight_Booking_Request',
    sa.Column('fbooking_id', sa.Integer(), nullable=False),
    sa.Column('fbooking_email', sa.String(length=100), nullable=True),
    sa.Column('fbooking_departure', sa.String(length=100), nullable=False),
    sa.Column('fbooking_arrival', sa.String(length=200), nullable=False),
    sa.Column('fbooking_departure_date', sa.Date(), nullable=False),
    sa.Column('fbooking_arrival_date', sa.Date(), nullable=False),
    sa.Column('fbooking_budget_range', sa.Integer(), nullable=True),
    sa.Column('fbooking_head_count', sa.Integer(), nullable=True),
    sa.PrimaryKeyConstraint('fbooking_id')
    )
    op.create_table('Hotel_Booking_Request',
    sa.Column('hbooking_id', sa.Integer(), nullable=False),
    sa.Column('hbooking_email', sa.String(length=100), nullable=True),
    sa.Column('hbooking_location', sa.String(length=200), nullable=False),
    sa.Column('hbooking_check_in', sa.Date(), nullable=True),
    sa.Column('hbooking_check_out', sa.Date(), nullable=True),
    sa.Column('hbooking_number_of_rooms', sa.Integer(), nullable=True),
    sa.Column('hbooking_budget_range', sa.Integer(), nullable=True),
    sa.PrimaryKeyConstraint('hbooking_id')
    )
    op.create_table('Package',
    sa.Column('package_id', sa.Integer(), nullable=False),
    sa.Column('package_name', sa.String(length=100), nullable=False),
    sa.Column('package_description', sa.String(length=200), nullable=False),
    sa.Column('package_price', sa.Integer(), nullable=True),
    sa.Column('package_createtime', sa.DateTime(), nullable=True),
    sa.Column('package_updated', sa.DateTime(), nullable=True),
    sa.PrimaryKeyConstraint('package_id')
    )
    op.create_table('user',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('username', sa.String(length=50), nullable=False),
    sa.Column('password', sa.String(length=255), nullable=False),
    sa.Column('email', sa.String(length=255), nullable=False),
    sa.Column('confirmed_at', sa.DateTime(), nullable=True),
    sa.Column('is_enabled', sa.Boolean(), nullable=False),
    sa.Column('first_name', sa.String(length=50), nullable=False),
    sa.Column('last_name', sa.String(length=50), nullable=False),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('email'),
    sa.UniqueConstraint('username')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('user')
    op.drop_table('Package')
    op.drop_table('Hotel_Booking_Request')
    op.drop_table('Flight_Booking_Request')
    # ### end Alembic commands ###
