"""empty message

Revision ID: f9fee6dd928b
Revises: 
Create Date: 2021-08-04 19:33:53.195038

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('host',
    sa.Column('host_id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('host_full_name', sa.String(), nullable=True),
    sa.Column('host_address', sa.String(), nullable=True),
    sa.Column('host_phone', sa.String(), nullable=True),
    sa.Column('host_introduction', sa.String(), nullable=True),
    sa.Column('host_email', sa.String(), nullable=True),
    sa.Column('host_city', sa.String(), nullable=True),
    sa.PrimaryKeyConstraint('host_id')
    )
    op.create_table('user',
    sa.Column('user_id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('username', sa.String(), nullable=True),
    sa.Column('user_full_name', sa.String(), nullable=True),
    sa.Column('user_address', sa.String(), nullable=True),
    sa.Column('user_phone', sa.String(), nullable=True),
    sa.PrimaryKeyConstraint('user_id'),
    sa.UniqueConstraint('username')
    )
    op.create_table('experience',
    sa.Column('exp_id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('exp_title', sa.String(length=50), nullable=True),
    sa.Column('cuisine', sa.String(length=20), nullable=True),
    sa.Column('exp_price', sa.Float(), nullable=True),
    sa.Column('exp_description', sa.String(length=500), nullable=True),
    sa.Column('dinetime', sa.String(length=15), nullable=True),
    sa.Column('host_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['host_id'], ['host.host_id'], ),
    sa.PrimaryKeyConstraint('exp_id')
    )
    op.create_table('image',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('img', sa.LargeBinary(), nullable=False),
    sa.Column('name', sa.Text(), nullable=False),
    sa.Column('mimetype', sa.Text(), nullable=False),
    sa.Column('host_id', sa.Integer(), nullable=True),
    sa.Column('exp_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['exp_id'], ['experience.exp_id'], ),
    sa.ForeignKeyConstraint(['host_id'], ['host.host_id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('order',
    sa.Column('order_id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('date_of_order', sa.DateTime(), nullable=False),
    sa.Column('user_id', sa.Integer(), nullable=True),
    sa.Column('exp_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['exp_id'], ['experience.exp_id'], ),
    sa.ForeignKeyConstraint(['user_id'], ['user.user_id'], ),
    sa.PrimaryKeyConstraint('order_id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('order')
    op.drop_table('image')
    op.drop_table('experience')
    op.drop_table('user')
    op.drop_table('host')
    # ### end Alembic commands ###
