"""first commit user and attraction

Revision ID: 5e07680b2642
Revises: 
Create Date: 2021-05-14 19:24:43.498909

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

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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('url')
    op.drop_table('travel_spot')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('travel_spot',
    sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=False),
    sa.Column('name', mysql.VARCHAR(length=255), nullable=False),
    sa.Column('transport', mysql.VARCHAR(length=8000), nullable=True),
    sa.Column('category', mysql.VARCHAR(length=1000), nullable=False),
    sa.Column('longitude', mysql.FLOAT(), nullable=False),
    sa.Column('latitude', mysql.FLOAT(), nullable=False),
    sa.Column('address', mysql.VARCHAR(length=1000), nullable=False),
    sa.Column('describe', mysql.VARCHAR(length=9000), nullable=False),
    sa.Column('mrt', mysql.VARCHAR(length=1000), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    mysql_default_charset='utf8',
    mysql_engine='InnoDB'
    )
    op.create_table('url',
    sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False),
    sa.Column('spot_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True),
    sa.Column('url', mysql.VARCHAR(length=8000), nullable=False),
    sa.ForeignKeyConstraint(['spot_id'], ['travel_spot.id'], name='url_ibfk_1'),
    sa.PrimaryKeyConstraint('id'),
    mysql_default_charset='utf8',
    mysql_engine='InnoDB'
    )
    # ### end Alembic commands ###
