"""Initial 5

Revision ID: 0101e666f4e9
Revises: 6c98e82ae2b5
Create Date: 2021-11-14 01:40:19.792380

"""
from alembic import op
import sqlalchemy as sa
import sqlmodel


# revision identifiers, used by Alembic.
revision = '0101e666f4e9'
down_revision = '6c98e82ae2b5'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('interest_points',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('latitude', sa.Float(), nullable=True),
    sa.Column('longitude', sa.Float(), nullable=True),
    sa.Column('name', sqlmodel.sql.sqltypes.AutoString(), nullable=False),
    sa.Column('address', sqlmodel.sql.sqltypes.AutoString(), nullable=False),
    sa.Column('distance', sa.Integer(), nullable=False),
    sa.Column('website', sqlmodel.sql.sqltypes.AutoString(), nullable=True),
    sa.Column('website_domain', sqlmodel.sql.sqltypes.AutoString(), nullable=True),
    sa.Column('chain_name', sqlmodel.sql.sqltypes.AutoString(), nullable=True),
    sa.Column('listing_id', sa.Integer(), nullable=True),
    sa.Column('created_at', sa.DateTime(), nullable=True),
    sa.Column('updated_at', sa.DateTime(), nullable=True),
    sa.ForeignKeyConstraint(['listing_id'], ['listings.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_interest_points_address'), 'interest_points', ['address'], unique=False)
    op.create_index(op.f('ix_interest_points_chain_name'), 'interest_points', ['chain_name'], unique=False)
    op.create_index(op.f('ix_interest_points_created_at'), 'interest_points', ['created_at'], unique=False)
    op.create_index(op.f('ix_interest_points_distance'), 'interest_points', ['distance'], unique=False)
    op.create_index(op.f('ix_interest_points_id'), 'interest_points', ['id'], unique=False)
    op.create_index(op.f('ix_interest_points_latitude'), 'interest_points', ['latitude'], unique=False)
    op.create_index(op.f('ix_interest_points_listing_id'), 'interest_points', ['listing_id'], unique=False)
    op.create_index(op.f('ix_interest_points_longitude'), 'interest_points', ['longitude'], unique=False)
    op.create_index(op.f('ix_interest_points_name'), 'interest_points', ['name'], unique=False)
    op.create_index(op.f('ix_interest_points_updated_at'), 'interest_points', ['updated_at'], unique=False)
    op.create_index(op.f('ix_interest_points_website'), 'interest_points', ['website'], unique=False)
    op.create_index(op.f('ix_interest_points_website_domain'), 'interest_points', ['website_domain'], unique=False)
    op.create_table('places_nearby',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('latitude', sa.Float(), nullable=True),
    sa.Column('longitude', sa.Float(), nullable=True),
    sa.Column('name', sqlmodel.sql.sqltypes.AutoString(), nullable=False),
    sa.Column('address', sqlmodel.sql.sqltypes.AutoString(), nullable=False),
    sa.Column('distance', sa.Integer(), nullable=False),
    sa.Column('website', sqlmodel.sql.sqltypes.AutoString(), nullable=True),
    sa.Column('website_domain', sqlmodel.sql.sqltypes.AutoString(), nullable=True),
    sa.Column('chain_name', sqlmodel.sql.sqltypes.AutoString(), nullable=True),
    sa.Column('listing_id', sa.Integer(), nullable=True),
    sa.Column('created_at', sa.DateTime(), nullable=True),
    sa.Column('updated_at', sa.DateTime(), nullable=True),
    sa.ForeignKeyConstraint(['listing_id'], ['listings.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_places_nearby_address'), 'places_nearby', ['address'], unique=False)
    op.create_index(op.f('ix_places_nearby_chain_name'), 'places_nearby', ['chain_name'], unique=False)
    op.create_index(op.f('ix_places_nearby_created_at'), 'places_nearby', ['created_at'], unique=False)
    op.create_index(op.f('ix_places_nearby_distance'), 'places_nearby', ['distance'], unique=False)
    op.create_index(op.f('ix_places_nearby_id'), 'places_nearby', ['id'], unique=False)
    op.create_index(op.f('ix_places_nearby_latitude'), 'places_nearby', ['latitude'], unique=False)
    op.create_index(op.f('ix_places_nearby_listing_id'), 'places_nearby', ['listing_id'], unique=False)
    op.create_index(op.f('ix_places_nearby_longitude'), 'places_nearby', ['longitude'], unique=False)
    op.create_index(op.f('ix_places_nearby_name'), 'places_nearby', ['name'], unique=False)
    op.create_index(op.f('ix_places_nearby_updated_at'), 'places_nearby', ['updated_at'], unique=False)
    op.create_index(op.f('ix_places_nearby_website'), 'places_nearby', ['website'], unique=False)
    op.create_index(op.f('ix_places_nearby_website_domain'), 'places_nearby', ['website_domain'], unique=False)
    op.create_table('routes',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('latitude', sa.Float(), nullable=True),
    sa.Column('longitude', sa.Float(), nullable=True),
    sa.Column('name', sqlmodel.sql.sqltypes.AutoString(), nullable=False),
    sa.Column('address', sqlmodel.sql.sqltypes.AutoString(), nullable=False),
    sa.Column('distance', sa.Integer(), nullable=False),
    sa.Column('website', sqlmodel.sql.sqltypes.AutoString(), nullable=True),
    sa.Column('website_domain', 