"""empty message

Revision ID: 088af9332f5f
Revises: 
Create Date: 2019-04-13 10:33:49.506500

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('adcode',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('province', sa.String(length=50), nullable=False),
    sa.Column('city', sa.String(length=50), nullable=False),
    sa.Column('adcode', sa.Integer(), nullable=False),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('commonparameters_tagged_new',
    sa.Column('dt', sa.String(length=50), nullable=True),
    sa.Column('province', sa.String(length=50), nullable=True),
    sa.Column('city', sa.String(length=50), nullable=True),
    sa.Column('region', sa.String(length=50), nullable=True),
    sa.Column('cgi', sa.String(length=50), nullable=False),
    sa.Column('tac', sa.Integer(), nullable=True),
    sa.Column('chinesename', sa.String(length=200), nullable=True),
    sa.Column('covertype', sa.String(length=50), nullable=True),
    sa.Column('scenario', sa.String(length=50), nullable=True),
    sa.Column('vendor', sa.String(length=50), nullable=True),
    sa.Column('earfcn', sa.Integer(), nullable=True),
    sa.Column('nettype', sa.String(length=50), nullable=True),
    sa.Column('pci', sa.Integer(), nullable=True),
    sa.Column('iscore', sa.Boolean(), nullable=True),
    sa.Column('gpslat', sa.Float(), nullable=True),
    sa.Column('gpslng', sa.Float(), nullable=True),
    sa.Column('bdlat', sa.Float(), nullable=True),
    sa.Column('bdlng', sa.Float(), nullable=True),
    sa.Column('angle', sa.Integer(), nullable=True),
    sa.Column('height', sa.String(length=50), nullable=True),
    sa.Column('totaltilt', sa.Float(), nullable=True),
    sa.Column('iscounty', sa.Boolean(), nullable=True),
    sa.Column('isauto', sa.Boolean(), nullable=True),
    sa.Column('flag', sa.Boolean(), nullable=True),
    sa.Column('residential_flag', sa.String(length=50), nullable=True),
    sa.Column('hospital_flag', sa.String(length=50), nullable=True),
    sa.Column('beauty_spot_flag', sa.String(length=50), nullable=True),
    sa.Column('college_flag', sa.String(length=50), nullable=True),
    sa.Column('food_centre_flag', sa.String(length=50), nullable=True),
    sa.Column('subway_flag', sa.String(length=50), nullable=True),
    sa.Column('high_speed_flag', sa.String(length=50), nullable=True),
    sa.Column('high_speed_rail_flag', sa.String(length=50), nullable=True),
    sa.Column('viaduct_flag', sa.String(length=50), nullable=True),
    sa.Column('high_rise_flag', sa.String(length=50), nullable=True),
    sa.PrimaryKeyConstraint('cgi')
    )
    op.create_table('gaodemapscene',
    sa.Column('id', sa.String(length=20), nullable=False),
    sa.Column('province', sa.String(length=50), nullable=True),
    sa.Column('city', sa.String(length=50), nullable=True),
    sa.Column('name', sa.String(length=50), nullable=True),
    sa.Column('adcode', sa.String(length=20), nullable=True),
    sa.Column('district', sa.String(length=50), nullable=True),
    sa.Column('address', sa.String(length=100), nullable=True),
    sa.Column('longtitude', sa.Float(), nullable=True),
    sa.Column('latitude', sa.Float(), nullable=True),
    sa.Column('type', sa.String(length=100), nullable=True),
    sa.Column('typecode', sa.String(length=20), nullable=True),
    sa.Column('classify', sa.String(length=100), nullable=True),
    sa.Column('area', sa.Float(), nullable=True),
    sa.Column('shape', sa.Text(), nullable=True),
    sa.Column('wgs_long', sa.Float(), nullable=True),
    sa.Column('wgs_lat', sa.Float(), nullable=True),
    sa.Column('wgs_shape', sa.Text(), nullable=True),
    sa.Column('create_time', sa.DateTime(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('gaodemapscene_tagged',
    sa.Column('id', sa.String(length=20), nullable=False),
    sa.Column('province', sa.String(length=50), nullable=True),
    sa.Column('city', sa.String(length=50), nullable=True),
    sa.Column('name', sa.String(length=50), nullable=True),
    sa.Column('adcode', sa.String(length=20), nullable=True),
    sa.Column('district', sa.String(length=50), nullable=True),
    sa.Column('address', sa.String(length=100), nullable=True),
    sa.Column('longtitude', sa.Float(), nullable=True),
    sa.Column('latitude', sa.Float(), nullable=True),
    sa.Column('type', sa.String(length=100), nullable=True),
    sa.Column('typecode', sa.String(length=20), nullable=True),
    sa.Column('classify', sa.String(length=100), nullable=True),
    sa.Column('area', sa.Float(), nullable=True),
    sa.Column('shape', sa.Text(), nullable=True),
    sa.Column('wgs_long', sa.Float(), nullable=True),
    sa.Column('wgs_lat', sa.Float(), nullable=True),
    sa.Column('wgs_shape', sa.Text(), nullable=True),
    sa.Column('cgi_1', sa.String(length=50), nullable=True),
    sa.Column('chinesename_1', sa.String(length=200), nullable=True),
    sa.Column('pci_1', sa.Integer(), nullable=True),
    sa.Column('cgi_2', sa.String(length=50), nullable=True),
    sa.Column('chinesename_2', sa.String(length=200), nullable=True),
    sa.Column('pci_2', sa.Integer(), nullable=True),
    sa.Column('cgi_3', sa.String(length=50), nullable=True),
    sa.Column('chinesename_3', sa.String(length=200), nullable=True),
    sa.Column('pci_3', sa.Integer(), nullable=True),
    sa.Column('cgi_4', sa.String(length=50), nullable=True),
    sa.Column('chinesename_4', sa.String(length=200), nullable=True),
    sa.Column('pci_4', sa.Integer(), nullable=True),
    sa.Column('cgi_5', sa.String(length=50), nullable=True),
    sa.Column('chinesename_5', sa.String(length=200), nullable=True),
    sa.Column('pci_5', sa.Integer(), nullable=True),
    sa.Column('cgi_6', sa.String(length=50), nullable=True),
    sa.Column('chinesename_6', sa.String(length=200), nullable=True),
    sa.Column('pci_6', sa.Integer(), nullable=True),
    sa.Column('cgi_7', sa.String(length=50), nullable=True),
    sa.Column('chinesename_7', sa.String(length=200), nullable=True),
    sa.Column('pci_7', sa.Integer(), nullable=True),
    sa.Column('cgi_8', sa.String(length=50), nullable=True),
    sa.Column('chinesename_8', sa.String(length=200), nullable=True),
    sa.Column('pci_8', sa.Integer(), nullable=True),
    sa.Column('cgi_9', sa.String(length=50), nullable=True),
    sa.Column('chinesename_9', sa.String(length=200), nullable=True),
    sa.Column('pci_9', sa.Integer(), nullable=True),
    sa.Column('cgi_10', sa.String(length=50), nullable=True),
    sa.Column('chinesename_10', sa.String(length=200), nullable=True),
    sa.Column('pci_10', sa.Integer(), nullable=True),
    sa.Column('cgi_11', sa.String(length=50), nullable=True),
    sa.Column('chinesename_11', sa.String(length=200), nullable=True),
    sa.Column('pci_11', sa.Integer(), nullable=True),
    sa.Column('cgi_12', sa.String(length=50), nullable=True),
    sa.Column('chinesename_12', sa.String(length=200), nullable=True),
    sa.Column('pci_12', sa.Integer(), nullable=True),
    sa.Column('cgi_13', sa.String(length=50), nullable=True),
    sa.Column('chinesename_13', sa.String(length=200), nullable=True),
    sa.Column('pci_13', sa.Integer(), nullable=True),
    sa.Column('cgi_14', sa.String(length=50), nullable=True),
    sa.Column('chinesename_14', sa.String(length=200), nullable=True),
    sa.Column('pci_14', sa.Integer(), nullable=True),
    sa.Column('cgi_15', sa.String(length=50), nullable=True),
    sa.Column('chinesename_15', sa.String(length=200), nullable=True),
    sa.Column('pci_15', sa.Integer(), nullable=True),
    sa.Column('cgi_16', sa.String(length=50), nullable=True),
    sa.Column('chinesename_16', sa.String(length=200), nullable=True),
    sa.Column('pci_16', sa.Integer(), nullable=True),
    sa.Column('cgi_17', sa.String(length=50), nullable=True),
    sa.Column('chinesename_17', sa.String(length=200), nullable=True),
    sa.Column('pci_17', sa.Integer(), nullable=True),
    sa.Column('cgi_18', sa.String(length=50), nullable=True),
    sa.Column('chinesename_18', sa.String(length=200), nullable=True),
    sa.Column('pci_18', sa.Integer(), nullable=True),
    sa.Column('cgi_19', sa.String(length=50), nullable=True),
    sa.Column('chinesename_19', sa.String(length=200), nullable=True),
    sa.Column('pci_19', sa.Integer(), nullable=True),
    sa.Column('cgi_20', sa.String(length=50), nullable=True),
    sa.Column('chinesename_20', sa.String(length=200), nullable=True),
    sa.Column('pci_20', sa.Integer(), nullable=True),
    sa.Column('cgi_21', sa.String(length=50), nullable=True),
    sa.Column('chinesename_21', sa.String(length=200), nullable=True),
    sa.Column('pci_21', sa.Integer(), nullable=True),
    sa.Column('cgi_22', sa.String(length=50), nullable=True),
    sa.Column('chinesename_22', sa.String(length=200), nullable=True),
    sa.Column('pci_22', sa.Integer(), nullable=True),
    sa.Column('cgi_23', sa.String(length=50), nullable=True),
    sa.Column('chinesename_23', sa.String(length=200), nullable=True),
    sa.Column('pci_23', sa.Integer(), nullable=True),
    sa.Column('cgi_24', sa.String(length=50), nullable=True),
    sa.Column('chinesename_24', sa.String(length=200), nullable=True),
    sa.Column('pci_24', sa.Integer(), nullable=True),
    sa.Column('cgi_25', sa.String(length=50), nullable=True),
    sa.Column('chinesename_25', sa.String(length=200), nullable=True),
    sa.Column('pci_25', sa.Integer(), nullable=True),
    sa.Column('cgi_26', sa.String(length=50), nullable=True),
    sa.Column('chinesename_26', sa.String(length=200), nullable=True),
    sa.Column('pci_26', sa.Integer(), nullable=True),
    sa.Column('cgi_27', sa.String(length=50), nullable=True),
    sa.Column('chinesename_27', sa.String(length=200), nullable=True),
    sa.Column('pci_27', sa.Integer(), nullable=True),
    sa.Column('cgi_28', sa.String(length=50), nullable=True),
    sa.Column('chinesename_28', sa.String(length=200), nullable=True),
    sa.Column('pci_28', sa.Integer(), nullable=True),
    sa.Column('cgi_29', sa.String(length=50), nullable=True),
    sa.Column('chinesename_29', sa.String(length=200), nullable=True),
    sa.Column('pci_29', sa.Integer(), nullable=True),
    sa.Column('cgi_30', sa.String(length=50), nullable=True),
    sa.Column('chinesename_30', sa.String(length=200), nullable=True),
    sa.Column('pci_30', sa.Integer(), nullable=True),
    sa.Column('cgi_31', sa.String(length=50), nullable=True),
    sa.Column('chinesename_31', sa.String(length=200), nullable=True),
    sa.Column('pci_31', sa.Integer(), nullable=True),
    sa.Column('cgi_32', sa.String(length=50), nullable=True),
    sa.Column('chinesename_32', sa.String(length=200), nullable=True),
    sa.Column('pci_32', sa.Integer(), nullable=True),
    sa.Column('cgi_33', sa.String(length=50), nullable=True),
    sa.Column('chinesename_33', sa.String(length=200), nullable=True),
    sa.Column('pci_33', sa.Integer(), nullable=True),
    sa.Column('cgi_34', sa.String(length=50), nullable=True),
    sa.Column('chinesename_34', sa.String(length=200), nullable=True),
    sa.Column('pci_34', sa.Integer(), nullable=True),
    sa.Column('cgi_35', sa.String(length=50), nullable=True),
    sa.Column('chinesename_35', sa.String(length=200), nullable=True),
    sa.Column('pci_35', sa.Integer(), nullable=True),
    sa.Column('cgi_36', sa.String(length=50), nullable=True),
    sa.Column('chinesename_36', sa.String(length=200), nullable=True),
    sa.Column('pci_36', sa.Integer(), nullable=True),
    sa.Column('cgi_37', sa.String(length=50), nullable=True),
    sa.Column('chinesename_37', sa.String(length=200), nullable=True),
    sa.Column('pci_37', sa.Integer(), nullable=True),
    sa.Column('cgi_38', sa.String(length=50), nullable=True),
    sa.Column('chinesename_38', sa.String(length=200), nullable=True),
    sa.Column('pci_38', sa.Integer(), nullable=True),
    sa.Column('cgi_39', sa.String(length=50), nullable=True),
    sa.Column('chinesename_39', sa.String(length=200), nullable=True),
    sa.Column('pci_39', sa.Integer(), nullable=True),
    sa.Column('cgi_40', sa.String(length=50), nullable=True),
    sa.Column('chinesename_40', sa.String(length=200), nullable=True),
    sa.Column('pci_40', sa.Integer(), nullable=True),
    sa.Column('cgi_41', sa.String(length=50), nullable=True),
    sa.Column('chinesename_41', sa.String(length=200), nullable=True),
    sa.Column('pci_41', sa.Integer(), nullable=True),
    sa.Column('cgi_42', sa.String(length=50), nullable=True),
    sa.Column('chinesename_42', sa.String(length=200), nullable=True),
    sa.Column('pci_42', sa.Integer(), nullable=True),
    sa.Column('cgi_43', sa.String(length=50), nullable=True),
    sa.Column('chinesename_43', sa.String(length=200), nullable=True),
    sa.Column('pci_43', sa.Integer(), nullable=True),
    sa.Column('cgi_44', sa.String(length=50), nullable=True),
    sa.Column('chinesename_44', sa.String(length=200), nullable=True),
    sa.Column('pci_44', sa.Integer(), nullable=True),
    sa.Column('cgi_45', sa.String(length=50), nullable=True),
    sa.Column('chinesename_45', sa.String(length=200), nullable=True),
    sa.Column('pci_45', sa.Integer(), nullable=True),
    sa.Column('cgi_46', sa.String(length=50), nullable=True),
    sa.Column('chinesename_46', sa.String(length=200), nullable=True),
    sa.Column('pci_46', sa.Integer(), nullable=True),
    sa.Column('cgi_47', sa.String(length=50), nullable=True),
    sa.Column('chinesename_47', sa.String(length=200), nullable=True),
    sa.Column('pci_47', sa.Integer(), nullable=True),
    sa.Column('cgi_48', sa.String(length=50), nullable=True),
    sa.Column('chinesename_48', sa.String(length=200), nullable=True),
    sa.Column('pci_48', sa.Integer(), nullable=True),
    sa.Column('cgi_49', sa.String(length=50), nullable=True),
    sa.Column('chinesename_49', sa.String(length=200), nullable=True),
    sa.Column('pci_49', sa.Integer(), nullable=True),
    sa.Column('cgi_50', sa.String(length=50), nullable=True),
    sa.Column('chinesename_50', sa.String(length=200), nullable=True),
    sa.Column('pci_50', sa.Integer(), nullable=True),
    sa.Column('cgi_51', sa.String(length=50), nullable=True),
    sa.Column('chinesename_51', sa.String(length=200), nullable=True),
    sa.Column('pci_51', sa.Integer(), nullable=True),
    sa.Column('cgi_52', sa.String(length=50), nullable=True),
    sa.Column('chinesename_52', sa.String(length=200), nullable=True),
    sa.Column('pci_52', sa.Integer(), nullable=True),
    sa.Column('cgi_53', sa.String(length=50), nullable=True),
    sa.Column('chinesename_53', sa.String(length=200), nullable=True),
    sa.Column('pci_53', sa.Integer(), nullable=True),
    sa.Column('cgi_54', sa.String(length=50), nullable=True),
    sa.Column('chinesename_54', sa.String(length=200), nullable=True),
    sa.Column('pci_54', sa.Integer(), nullable=True),
    sa.Column('cgi_55', sa.String(length=50), nullable=True),
    sa.Column('chinesename_55', sa.String(length=200), nullable=True),
    sa.Column('pci_55', sa.Integer(), nullable=True),
    sa.Column('cgi_56', sa.String(length=50), nullable=True),
    sa.Column('chinesename_56', sa.String(length=200), nullable=True),
    sa.Column('pci_56', sa.Integer(), nullable=True),
    sa.Column('cgi_57', sa.String(length=50), nullable=True),
    sa.Column('chinesename_57', sa.String(length=200), nullable=True),
    sa.Column('pci_57', sa.Integer(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('indexShow',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('province', sa.String(length=50), nullable=True),
    sa.Column('crawlNum', sa.Integer(), nullable=True),
    sa.Column('crawlRes', sa.Integer(), nullable=True),
    sa.Column('crawlHos', sa.Integer(), nullable=True),
    sa.Column('crawlNumWithShape', sa.Integer(), nullable=True),
    sa.Column('crawlResWithShape', sa.Integer(), nullable=True),
    sa.Column('crawlHosWithShape', sa.Integer(), nullable=True),
    sa.Column('crawlToday', sa.Integer(), nullable=True),
    sa.Column('crawlTodayWithShape', sa.Integer(), nullable=True),
    sa.Column('NumOfInsideRes', sa.Integer(), nullable=True),
    sa.Column('NumOfNearRes', sa.Integer(), nullable=True),
    sa.Column('NumOfMiddleRes', sa.Integer(), nullable=True),
    sa.Column('NumOfInsideHos', sa.Integer(), nullable=True),
    sa.Column('NumOfNearHos', sa.Integer(), nullable=True),
    sa.Column('NumOfMiddelHos', sa.Integer(), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('province')
    )
    op.create_table('scenecode',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('scene', sa.String(length=50), nullable=False),
    sa.Column('scenecode', sa.String(length=50), nullable=False),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('scrape_missions',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=True),
    sa.Column('username', sa.String(length=50), nullable=False),
    sa.Column('email', sa.String(length=50), nullable=False),
    sa.Column('city', sa.String(length=50), nullable=False),
    sa.Column('city_adcode', sa.String(length=6), nullable=False),
    sa.Column('scene', sa.String(length=50), nullable=False),
    sa.Column('type_code', sa.String(length=6), nullable=False),
    sa.Column('resolution', sa.Float(), nullable=True),
    sa.Column('status', sa.String(length=100), nullable=False),
    sa.Column('final_grid', sa.Integer(), nullable=True),
    sa.Column('adsl_server_url', sa.String(length=100), nullable=False),
    sa.Column('adsl_auth', sa.String(length=100), nullable=False),
    sa.Column('keys', sa.Text(), nullable=False),
    sa.Column('create_time', sa.DateTime(), nullable=True),
    sa.PrimaryKeyConstraint('city_adcode', 'type_code')
    )
    op.create_table('user',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('email', sa.String(length=50), nullable=True),
    sa.Column('username', sa.String(length=50), nullable=True),
    sa.Column('password', sa.String(length=256), nullable=True),
    sa.Column('is_activate', sa.Boolean(), nullable=True),
    sa.Column('is_delete', sa.Boolean(), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('email'),
    sa.UniqueConstraint('username')
    )
    op.create_table('note',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('title', sa.String(length=64), nullable=False),
    sa.Column('content', sa.Text(), nullable=False),
    sa.Column('create_time', sa.DateTime(), nullable=True),
    sa.Column('author_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['author_id'], ['user.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_note_create_time'), 'note', ['create_time'], unique=False)
    op.create_table('todos',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('create_time', sa.DateTime(), nullable=True),
    sa.Column('author_id', sa.Integer(), nullable=True),
    sa.Column('status', sa.Boolean(), nullable=True),
    sa.Column('todo_city', sa.String(length=50), nullable=True),
    sa.ForeignKeyConstraint(['author_id'], ['user.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_todos_create_time'), 'todos', ['create_time'], unique=False)
    op.create_table('comment',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('content', sa.Text(), nullable=False),
    sa.Column('note_id', sa.Integer(), nullable=True),
    sa.Column('author_id', sa.Integer(), nullable=True),
    sa.Column('create_time', sa.DateTime(), nullable=True),
    sa.ForeignKeyConstraint(['author_id'], ['user.id'], ),
    sa.ForeignKeyConstraint(['note_id'], ['note.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_comment_create_time'), 'comment', ['create_time'], unique=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_comment_create_time'), table_name='comment')
    op.drop_table('comment')
    op.drop_index(op.f('ix_todos_create_time'), table_name='todos')
    op.drop_table('todos')
    op.drop_index(op.f('ix_note_create_time'), table_name='note')
    op.drop_table('note')
    op.drop_table('user')
    op.drop_table('scrape_missions')
    op.drop_table('scenecode')
    op.drop_table('indexShow')
    op.drop_table('gaodemapscene_tagged')
    op.drop_table('gaodemapscene')
    op.drop_table('commonparameters_tagged_new')
    op.drop_table('adcode')
    # ### end Alembic commands ###
