"""Initial

Revision ID: d63ccd5484d7
Revises: 
Create Date: 2021-11-14 00:28:55.123695

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


# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('facilities',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sqlmodel.sql.sqltypes.AutoString(), nullable=False),
    sa.Column('category', sqlmodel.sql.sqltypes.AutoString(), nullable=True),
    sa.Column('notes', sqlmodel.sql.sqltypes.AutoString(), nullable=True),
    sa.Column('created_at', sa.DateTime(), nullable=True),
    sa.Column('updated_at', sa.DateTime(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_facilities_category'), 'facilities', ['category'], unique=False)
    op.create_index(op.f('ix_facilities_created_at'), 'facilities', ['created_at'], unique=False)
    op.create_index(op.f('ix_facilities_id'), 'facilities', ['id'], unique=False)
    op.create_index(op.f('ix_facilities_name'), 'facilities', ['name'], unique=False)
    op.create_index(op.f('ix_facilities_notes'), 'facilities', ['notes'], unique=False)
    op.create_index(op.f('ix_facilities_updated_at'), 'facilities', ['updated_at'], unique=False)
    op.create_table('increment',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_increment_id'), 'increment', ['id'], unique=False)
    op.create_table('listings',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('is_active', sa.Boolean(), nullable=False),
    sa.Column('title', sqlmodel.sql.sqltypes.AutoString(), nullable=True),
    sa.Column('description', sqlmodel.sql.sqltypes.AutoString(), nullable=True),
    sa.Column('url', sqlmodel.sql.sqltypes.AutoString(), nullable=False),
    sa.Column('source', sqlmodel.sql.sqltypes.AutoString(), nullable=False),
    sa.Column('source_id', sqlmodel.sql.sqltypes.AutoString(), nullable=False),
    sa.Column('source_code', sqlmodel.sql.sqltypes.AutoString(), nullable=False),
    sa.Column('address', sqlmodel.sql.sqltypes.AutoString(), nullable=False),
    sa.Column('short_postal_code', sqlmodel.sql.sqltypes.AutoString(), nullable=True),
    sa.Column('property_type', sqlmodel.sql.sqltypes.AutoString(), nullable=True),
    sa.Column('postal_code', sqlmodel.sql.sqltypes.AutoString(), nullable=True),
    sa.Column('ber_code', sqlmodel.sql.sqltypes.AutoString(), nullable=True),
    sa.Column('bedrooms', sa.Integer(), nullable=True),
    sa.Column('bathrooms', sa.Integer(), nullable=True),
    sa.Column('price', sa.Integer(), nullable=True),
    sa.Column('rating_auto', sa.Integer(), nullable=True),
    sa.Column('rating_user', sa.Integer(), nullable=True),
    sa.Column('telegram_sent_at', sa.DateTime(), nullable=True),
    sa.Column('images_count', sa.Integer(), nullable=True),
    sa.Column('latitude', sa.Float(), nullable=True),
    sa.Column('longitude', sa.Float(), nullable=True),
    sa.Column('notes', sqlmodel.sql.sqltypes.AutoString(), nullable=True),
    sa.Column('publish_date', sa.DateTime(), nullable=True),
    sa.Column('last_updated', sa.DateTime(), nullable=True),
    sa.Column('created_at', sa.DateTime(), nullable=True),
    sa.Column('updated_at', sa.DateTime(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_listings_address'), 'listings', ['address'], unique=False)
    op.create_index(op.f('ix_listings_bathrooms'), 'listings', ['bathrooms'], unique=False)
    op.create_index(op.f('ix_listings_bedrooms'), 'listings', ['bedrooms'], unique=False)
    op.create_index(op.f('ix_listings_ber_code'), 'listings', ['ber_code'], unique=False)
    op.create_index(op.f('ix_listings_created_at'), 'listings', ['created_at'], unique=False)
    op.create_index(op.f('ix_listings_description'), 'listings', ['description'], unique=False)
    op.create_index(op.f('ix_listings_id'), 'listings', ['id'], unique=False)
    op.create_index(op.f('ix_listings_images_count'), 'listings', ['images_count'], unique=False)
    op.create_index(op.f('ix_listings_is_active'), 'listings', ['is_active'], unique=False)
    op.create_index(op.f('ix_listings_last_updated'), 'listings', ['last_updated'], unique=False)
    op.create_index(op.f('ix_listings_latitude'), 'listings', ['latitude'], unique=False)
    op.create_index(op.f('ix_listings_longitude'), 'listings', ['longitude'], unique=False)
    op.create_index(op.f('ix_listings_notes'), 'listings', ['notes'], unique=False)
    op.create_index(op.f('ix_listings_postal_code'), 'listings', ['postal_code'], unique=False)
    op.create_index(op.f('ix_listings_price'), 'listings', ['price'], unique=False)
    op.create_index(op.f('ix_listings_property_type'), 'listings', ['property_type'], unique=False)
    op.create_index(op.f('ix_listings_publish_date'), 'listings', ['publish_date'], unique=False)
    op.create_index(op.f('ix_listings_rating_auto'), 'listings', ['rating_auto'], unique=False)
    op.create_index(op.f('ix_listings_rating_user'), 'listings', ['rating_user'], unique=False)
    op.create_index(op.f('ix_listings_short_postal_code'), 'listings', ['short_postal_code'], unique=False)
    op.create_index(op.f('ix_listings_source'), 'listings', ['source'], unique=False)
    op.create_index(op.f('ix_listings_source_code'), 'listings', ['source_code'], unique=False)
    op.create_index(op.f('ix_listings_source_id'), 'listings', ['source_id'], unique=False)
    op.create_index(op.f('ix_listings_telegram_sent_at'), 'listings', ['telegram_sent_at'], unique=False)
    op.create_index(op.f('ix_listings_title'), 'listings', ['title'], unique=False)
    op.create_index(op.f('ix_listings_updated_at'), 'listings', ['updated_at'], unique=False)
    op.create_index(op.f('ix_listings_url'), 'listings', ['url'], unique=False)
    op.create_table('song',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', 