"""empty message

Revision ID: e91a8ebd12d4
Revises: 43cfdf0f229c
Create Date: 2018-08-05 17:24:09.706201

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'e91a8ebd12d4'
down_revision = '43cfdf0f229c'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('amenity', 'hotel_id',
               existing_type=sa.INTEGER(),
               nullable=False)
    op.add_column('cuisine', sa.Column('desc', sa.Text(), nullable=True))
    op.add_column('cuisine', sa.Column('featured', sa.Boolean(), nullable=True))
    op.add_column('cuisine', sa.Column('image', sa.String(), nullable=True))
    op.alter_column('deal', 'room_id',
               existing_type=sa.INTEGER(),
               nullable=False)
    op.alter_column('deal', 'website_id',
               existing_type=sa.INTEGER(),
               nullable=False)
    op.alter_column('dish', 'restaurant_id',
               existing_type=sa.INTEGER(),
               nullable=False)
    op.alter_column('facility', 'room_id',
               existing_type=sa.INTEGER(),
               nullable=False)
    op.alter_column('image', 'hotel_id',
               existing_type=sa.INTEGER(),
               nullable=False)
    op.alter_column('member', 'room_id',
               existing_type=sa.INTEGER(),
               nullable=False)
    op.alter_column('menu', 'restaurant_id',
               existing_type=sa.INTEGER(),
               nullable=False)
    op.add_column('restaurant', sa.Column('locality', sa.String(), nullable=True))
    op.alter_column('restaurant_amenity', 'restaurant_id',
               existing_type=sa.INTEGER(),
               nullable=False)
    op.alter_column('restaurant_image', 'restaurant_id',
               existing_type=sa.INTEGER(),
               nullable=False)
    op.alter_column('room', 'hotel_id',
               existing_type=sa.INTEGER(),
               nullable=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('room', 'hotel_id',
               existing_type=sa.INTEGER(),
               nullable=True)
    op.alter_column('restaurant_image', 'restaurant_id',
               existing_type=sa.INTEGER(),
               nullable=True)
    op.alter_column('restaurant_amenity', 'restaurant_id',
               existing_type=sa.INTEGER(),
               nullable=True)
    op.drop_column('restaurant', 'locality')
    op.alter_column('menu', 'restaurant_id',
               existing_type=sa.INTEGER(),
               nullable=True)
    op.alter_column('member', 'room_id',
               existing_type=sa.INTEGER(),
               nullable=True)
    op.alter_column('image', 'hotel_id',
               existing_type=sa.INTEGER(),
               nullable=True)
    op.alter_column('facility', 'room_id',
               existing_type=sa.INTEGER(),
               nullable=True)
    op.alter_column('dish', 'restaurant_id',
               existing_type=sa.INTEGER(),
               nullable=True)
    op.alter_column('deal', 'website_id',
               existing_type=sa.INTEGER(),
               nullable=True)
    op.alter_column('deal', 'room_id',
               existing_type=sa.INTEGER(),
               nullable=True)
    op.drop_column('cuisine', 'image')
    op.drop_column('cuisine', 'featured')
    op.drop_column('cuisine', 'desc')
    op.alter_column('amenity', 'hotel_id',
               existing_type=sa.INTEGER(),
               nullable=True)
    # ### end Alembic commands ###
