Commit 54f72912 by dong

fix

parent 2afb0685
Generic single-database configuration.
\ No newline at end of file
# A generic, single database configuration.
[alembic]
# template used to generate migration files
# file_template = %%(rev)s_%%(slug)s
# set to 'true' to run the environment during
# the 'revision' command, regardless of autogenerate
# revision_environment = false
# Logging configuration
[loggers]
keys = root,sqlalchemy,alembic,flask_migrate
[handlers]
keys = console
[formatters]
keys = generic
[logger_root]
level = WARN
handlers = console
qualname =
[logger_sqlalchemy]
level = WARN
handlers =
qualname = sqlalchemy.engine
[logger_alembic]
level = INFO
handlers =
qualname = alembic
[logger_flask_migrate]
level = INFO
handlers =
qualname = flask_migrate
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
[formatter_generic]
format = %(levelname)-5.5s [%(name)s] %(message)s
datefmt = %H:%M:%S
from __future__ import with_statement
import logging
from logging.config import fileConfig
from flask import current_app
from alembic import context
# this is the Alembic Config object, which provides
# access to the values within the .ini file in use.
config = context.config
# Interpret the config file for Python logging.
# This line sets up loggers basically.
fileConfig(config.config_file_name)
logger = logging.getLogger('alembic.env')
# add your model's MetaData object here
# for 'autogenerate' support
# from myapp import mymodel
# target_metadata = mymodel.Base.metadata
config.set_main_option(
'sqlalchemy.url',
str(current_app.extensions['migrate'].db.engine.url).replace('%', '%%'))
target_metadata = current_app.extensions['migrate'].db.metadata
# other values from the config, defined by the needs of env.py,
# can be acquired:
# my_important_option = config.get_main_option("my_important_option")
# ... etc.
def run_migrations_offline():
"""Run migrations in 'offline' mode.
This configures the context with just a URL
and not an Engine, though an Engine is acceptable
here as well. By skipping the Engine creation
we don't even need a DBAPI to be available.
Calls to context.execute() here emit the given string to the
script output.
"""
url = config.get_main_option("sqlalchemy.url")
context.configure(
url=url, target_metadata=target_metadata, literal_binds=True
)
with context.begin_transaction():
context.run_migrations()
def run_migrations_online():
"""Run migrations in 'online' mode.
In this scenario we need to create an Engine
and associate a connection with the context.
"""
# this callback is used to prevent an auto-migration from being generated
# when there are no changes to the schema
# reference: http://alembic.zzzcomputing.com/en/latest/cookbook.html
def process_revision_directives(context, revision, directives):
if getattr(config.cmd_opts, 'autogenerate', False):
script = directives[0]
if script.upgrade_ops.is_empty():
directives[:] = []
logger.info('No changes in schema detected.')
connectable = current_app.extensions['migrate'].db.engine
with connectable.connect() as connection:
context.configure(
connection=connection,
target_metadata=target_metadata,
process_revision_directives=process_revision_directives,
**current_app.extensions['migrate'].configure_args
)
with context.begin_transaction():
context.run_migrations()
if context.is_offline_mode():
run_migrations_offline()
else:
run_migrations_online()
"""${message}
Revision ID: ${up_revision}
Revises: ${down_revision | comma,n}
Create Date: ${create_date}
"""
from alembic import op
import sqlalchemy as sa
${imports if imports else ""}
# revision identifiers, used by Alembic.
revision = ${repr(up_revision)}
down_revision = ${repr(down_revision)}
branch_labels = ${repr(branch_labels)}
depends_on = ${repr(depends_on)}
def upgrade():
${upgrades if upgrades else "pass"}
def downgrade():
${downgrades if downgrades else "pass"}
"""empty message
Revision ID: 031a5f982fc2
Revises: 6a08b8809873
Create Date: 2023-04-20 16:23:47.975466
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '031a5f982fc2'
down_revision = '6a08b8809873'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index('ix_enterprise111_c_type', table_name='enterprise111')
op.drop_index('ix_enterprise111_c_type1', table_name='enterprise111')
op.drop_index('ix_enterprise111_c_type2', table_name='enterprise111')
op.drop_index('ix_enterprise111_city', table_name='enterprise111')
op.drop_index('ix_enterprise111_company_id', table_name='enterprise111')
op.drop_index('ix_enterprise111_company_name', table_name='enterprise111')
op.drop_index('ix_enterprise111_district', table_name='enterprise111')
op.drop_index('ix_enterprise111_entypeid', table_name='enterprise111')
op.drop_index('ix_enterprise111_f_type', table_name='enterprise111')
op.drop_index('ix_enterprise111_province', table_name='enterprise111')
op.drop_index('ix_enterprise111_public_id', table_name='enterprise111')
op.drop_index('ix_enterprise111_roundid', table_name='enterprise111')
op.drop_index('ix_enterprise111_scale_range', table_name='enterprise111')
op.drop_index('ix_enterprise111_yearid', table_name='enterprise111')
op.drop_table('enterprise111')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('enterprise111',
sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False, comment='企业主键id主键id'),
sa.Column('chain_master', mysql.VARCHAR(length=20), nullable=True, comment='链主企业'),
sa.Column('company_id', mysql.VARCHAR(length=255), nullable=True, comment='企业id'),
sa.Column('company_name', mysql.VARCHAR(length=255), nullable=True, comment='企业名'),
sa.Column('status', mysql.VARCHAR(length=32), nullable=True, comment='经营状态'),
sa.Column('legal', mysql.VARCHAR(length=255), nullable=True, comment='发定代表人'),
sa.Column('capital', mysql.VARCHAR(length=255), nullable=True, comment='注册资本,22万美元'),
sa.Column('capital_nums', mysql.FLOAT(), nullable=True, comment='注册资本转换成人民币数值'),
sa.Column('capital_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='注册资本大小类型,0-100,1,100-500,2,500-1000,3,1000-5000,4,5000-10000,5,10000+,6'),
sa.Column('build_date', mysql.DATETIME(), nullable=True, comment='注册时间'),
sa.Column('yearid', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='成立时间年限id(1-3,1)(3-5,2)(5-8,3)(8-10,4)(10-15,5)(15以上,6)'),
sa.Column('province', mysql.VARCHAR(length=32), nullable=True, comment='省'),
sa.Column('city', mysql.VARCHAR(length=32), nullable=True, comment='市'),
sa.Column('district', mysql.VARCHAR(length=32), nullable=True, comment='区'),
sa.Column('lng', mysql.VARCHAR(length=100), nullable=True, comment='经度'),
sa.Column('lat', mysql.VARCHAR(length=100), nullable=True, comment='纬度'),
sa.Column('p_lng', mysql.VARCHAR(length=100), nullable=True, comment='省经度'),
sa.Column('p_lat', mysql.VARCHAR(length=100), nullable=True, comment='省纬度'),
sa.Column('c_lng', mysql.VARCHAR(length=100), nullable=True, comment='市经度'),
sa.Column('c_lat', mysql.VARCHAR(length=100), nullable=True, comment='市纬度'),
sa.Column('d_lng', mysql.VARCHAR(length=100), nullable=True, comment='区经度'),
sa.Column('d_lat', mysql.VARCHAR(length=100), nullable=True, comment='区纬度'),
sa.Column('address', mysql.VARCHAR(length=255), nullable=True, comment='企业地址'),
sa.Column('telephone', mysql.TEXT(), nullable=True, comment='电话'),
sa.Column('telephone_more', mysql.TEXT(), nullable=True, comment='更多电话'),
sa.Column('email', mysql.TEXT(), nullable=True, comment='邮箱'),
sa.Column('social_code', mysql.VARCHAR(length=100), nullable=True, comment='统一社会信用代码'),
sa.Column('tax_code', mysql.VARCHAR(length=100), nullable=True, comment='纳税人识别号'),
sa.Column('register_code', mysql.VARCHAR(length=100), nullable=True, comment='注册号'),
sa.Column('company_code', mysql.VARCHAR(length=100), nullable=True, comment='组织机构代码'),
sa.Column('bao_num', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='参保人数'),
sa.Column('entype', mysql.VARCHAR(length=100), nullable=True, comment='企业类型'),
sa.Column('entypeid', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='公司类型id(个人独资企业-1)(股份有限公司-2)(有限责任公司-3)(合伙企业-4)(集体所有制-5)(全民所有制企业-6)(外商企业-7)'),
sa.Column('scale_range', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='企业规模id,1:20人以下,2:20-99人,3:100-499人,4:500-999人,5: 1000-4999人,6:5000-9999人,7:10000人'),
sa.Column('company_industry', mysql.VARCHAR(length=100), nullable=True, comment='所属行业'),
sa.Column('web_site', mysql.VARCHAR(length=255), nullable=True, comment='企业网址'),
sa.Column('business_scope', mysql.TEXT(), nullable=True, comment='企业经营范围'),
sa.Column('register_org', mysql.VARCHAR(length=100), nullable=True, comment='登记机关'),
sa.Column('money_type', mysql.VARCHAR(length=100), nullable=True, comment='注册币种'),
sa.Column('money_type_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='注册币种类型id'),
sa.Column('high_new', mysql.VARCHAR(length=32), nullable=True, comment='是否高新技术企业'),
sa.Column('parti_year', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='高新企业注册年份'),
sa.Column('tbe', mysql.VARCHAR(length=32), nullable=True, comment='是否科技型中小企业'),
sa.Column('tbe_sjmy', mysql.VARCHAR(length=32), nullable=True, comment='是否为省级民营科技企业'),
sa.Column('zjtg', mysql.VARCHAR(length=32), nullable=True, comment='是否为专精特新企业'),
sa.Column('zjtg_gjjxjr', mysql.VARCHAR(length=32), nullable=True, comment='是否为国家级专精特新小巨人企业'),
sa.Column('zjtg_sjxjr', mysql.VARCHAR(length=32), nullable=True, comment='是否为省级专精特新小巨人企业'),
sa.Column('fianacing', mysql.VARCHAR(length=32), nullable=True, comment='是否为有融资企业'),
sa.Column('fianacing_rounds', mysql.VARCHAR(length=32), nullable=True, comment='融资轮次'),
sa.Column('roundid', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='融资轮次id(天使/种子,1)(PreA/A+,2)(PreB/B+,3)(C轮以上,4)(收并购,5)(战略投资,6)(其他,7)'),
sa.Column('financing_amount', mysql.FLOAT(), nullable=True, comment='融资金额'),
sa.Column('software_copyright', mysql.VARCHAR(length=32), nullable=True, comment='是否为有软件著作权'),
sa.Column('num_software', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='软件著作权个数'),
sa.Column('quoted_company', mysql.VARCHAR(length=32), nullable=True, comment='是否上市企业'),
sa.Column('public_sector', mysql.VARCHAR(length=32), nullable=True, comment='上市板块'),
sa.Column('public_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='上市版块的id----360企业画像(A股,1)(创业股,2)(港股,3)(新三股,4)(新四股,5)(中小板,6)'),
sa.Column('foreign_investment', mysql.VARCHAR(length=32), nullable=True, comment='是否外商投资'),
sa.Column('patent', mysql.VARCHAR(length=32), nullable=True, comment='是否为有专利企业'),
sa.Column('num_patent', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='专利个数'),
sa.Column('company_info', mysql.TEXT(), nullable=True, comment='公司简介'),
sa.Column('dengl', mysql.VARCHAR(length=32), nullable=True, comment='瞪羚'),
sa.Column('unicorn', mysql.VARCHAR(length=32), nullable=True, comment='独角兽企业'),
sa.Column('isfive', mysql.VARCHAR(length=32), nullable=True, comment='是否中国500强'),
sa.Column('takingn', mysql.FLOAT(), nullable=True, comment='营收'),
sa.Column('hots', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='企业热度(权重值)'),
sa.Column('c_name', mysql.VARCHAR(length=255), nullable=True, comment='行业类名'),
sa.Column('c_type', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='行业类id'),
sa.Column('product_all', mysql.VARCHAR(length=255), nullable=True, comment='公司拥有产品'),
sa.Column('c_name1', mysql.VARCHAR(length=255), nullable=True, comment='行业类名'),
sa.Column('c_type1', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='行业类id'),
sa.Column('product_all1', mysql.VARCHAR(length=255), nullable=True, comment='公司拥有产品'),
sa.Column('c_name2', mysql.VARCHAR(length=255), nullable=True, comment='行业类名'),
sa.Column('c_type2', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='行业类id'),
sa.Column('product_all2', mysql.VARCHAR(length=255), nullable=True, comment='公司拥有产品'),
sa.Column('f_name', mysql.VARCHAR(length=255), nullable=True, comment='父行业类名'),
sa.Column('f_type', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='父行业类id'),
sa.Column('sxonhun', mysql.VARCHAR(length=32), nullable=True, comment='是否山西100强'),
sa.Column('scale', mysql.VARCHAR(length=32), nullable=True, comment='规模以上企业'),
sa.Column('serve', mysql.VARCHAR(length=32), nullable=True, comment='限额以上服务业'),
sa.PrimaryKeyConstraint('id'),
comment='全国企业表',
mysql_comment='全国企业表',
mysql_default_charset='utf8',
mysql_engine='InnoDB'
)
op.create_index('ix_enterprise111_yearid', 'enterprise111', ['yearid'], unique=False)
op.create_index('ix_enterprise111_scale_range', 'enterprise111', ['scale_range'], unique=False)
op.create_index('ix_enterprise111_roundid', 'enterprise111', ['roundid'], unique=False)
op.create_index('ix_enterprise111_public_id', 'enterprise111', ['public_id'], unique=False)
op.create_index('ix_enterprise111_province', 'enterprise111', ['province'], unique=False)
op.create_index('ix_enterprise111_f_type', 'enterprise111', ['f_type'], unique=False)
op.create_index('ix_enterprise111_entypeid', 'enterprise111', ['entypeid'], unique=False)
op.create_index('ix_enterprise111_district', 'enterprise111', ['district'], unique=False)
op.create_index('ix_enterprise111_company_name', 'enterprise111', ['company_name'], unique=False)
op.create_index('ix_enterprise111_company_id', 'enterprise111', ['company_id'], unique=False)
op.create_index('ix_enterprise111_city', 'enterprise111', ['city'], unique=False)
op.create_index('ix_enterprise111_c_type2', 'enterprise111', ['c_type2'], unique=False)
op.create_index('ix_enterprise111_c_type1', 'enterprise111', ['c_type1'], unique=False)
op.create_index('ix_enterprise111_c_type', 'enterprise111', ['c_type'], unique=False)
# ### end Alembic commands ###
"""empty message
Revision ID: 0440b17fefaa
Revises: d1f1ec828b23
Create Date: 2022-03-08 18:06:14.069161
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '0440b17fefaa'
down_revision = 'd1f1ec828b23'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('government_organization',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('pnums', sa.Integer(), nullable=True, comment='人数'),
sa.Column('charge', sa.String(length=20), nullable=True, comment='机构负责人'),
sa.Column('charge_phone', sa.String(length=20), nullable=True, comment='负责人电话'),
sa.Column('function', sa.Text(), nullable=True, comment='部门职能'),
sa.Column('name', sa.String(length=30), nullable=True, comment='新增时间'),
sa.Column('add_person', sa.String(length=20), nullable=True, comment='新增人'),
sa.Column('add_time', sa.DateTime(), nullable=True, comment='新增时间'),
sa.Column('edit_person', sa.String(length=20), nullable=True, comment='编辑人'),
sa.Column('edit_time', sa.DateTime(), nullable=True, comment='编辑时间'),
sa.PrimaryKeyConstraint('id')
)
op.create_table('government_department',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('pnums', sa.Integer(), nullable=True, comment='人数'),
sa.Column('charge', sa.String(length=255), nullable=True, comment='部门负责人'),
sa.Column('charge_phone', sa.String(length=255), nullable=True, comment='负责人电话'),
sa.Column('function', sa.Text(), nullable=True, comment='负责人电话'),
sa.Column('name', sa.String(length=255), nullable=False, comment='政府机构部门名称'),
sa.Column('goverment_org_id', sa.Integer(), nullable=True, comment='外键id,机构id'),
sa.ForeignKeyConstraint(['goverment_org_id'], ['government_organization.id'], ),
sa.PrimaryKeyConstraint('id')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('government_department')
op.drop_table('government_organization')
# ### end Alembic commands ###
"""empty message
Revision ID: 08c109f72e57
Revises: bbe194dda5cc
Create Date: 2022-11-15 16:49:23.872587
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '08c109f72e57'
down_revision = 'bbe194dda5cc'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('siku_project', sa.Column('flag', sa.Integer(), nullable=True, comment='1为线索库,2为对接库,3为签约库,4为开工库'))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('siku_project', 'flag')
# ### end Alembic commands ###
"""empty message
Revision ID: 0a26b9ded8ca
Revises: c04177a30f4a
Create Date: 2023-02-14 09:58:23.220157
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '0a26b9ded8ca'
down_revision = 'c04177a30f4a'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('industry_chain', sa.Column('chain_id', sa.Integer(), nullable=True, comment='关系id(关联哪个产业链'))
op.alter_column('industry_chain', 'relate_id',
existing_type=mysql.INTEGER(display_width=11),
comment='关系id(关联哪个产业环节',
existing_comment='关系id(关联与哪个产业环节',
existing_nullable=True)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('industry_chain', 'relate_id',
existing_type=mysql.INTEGER(display_width=11),
comment='关系id(关联与哪个产业环节',
existing_comment='关系id(关联哪个产业环节',
existing_nullable=True)
op.drop_column('industry_chain', 'chain_id')
# ### end Alembic commands ###
"""empty message
Revision ID: 0aa5a0f4e755
Revises: 4ff348e88f11
Create Date: 2023-02-22 14:25:27.882298
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '0aa5a0f4e755'
down_revision = '4ff348e88f11'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('carrier_build', sa.Column('builde_type', sa.String(length=20), nullable=True, comment='楼宇类型(商铺/写字楼/其他)'))
op.drop_column('carrier_build', 'buide_type')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('carrier_build', sa.Column('buide_type', mysql.VARCHAR(length=20), nullable=True, comment='楼宇类型(商铺/写字楼/其他)'))
op.drop_column('carrier_build', 'builde_type')
# ### end Alembic commands ###
"""empty message
Revision ID: 0aad01ae0dda
Revises: d54ab46ad83a
Create Date: 2022-11-16 17:23:10.465454
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '0aad01ae0dda'
down_revision = 'd54ab46ad83a'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('joint_img', sa.Column('project_id', sa.Integer(), nullable=True, comment='外键id,项目id'))
op.create_foreign_key(None, 'joint_img', 'siku_project', ['project_id'], ['id'])
op.add_column('progress_condition', sa.Column('project_id', sa.Integer(), nullable=True, comment='外键id,项目id'))
op.create_foreign_key(None, 'progress_condition', 'siku_project', ['project_id'], ['id'])
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint(None, 'progress_condition', type_='foreignkey')
op.drop_column('progress_condition', 'project_id')
op.drop_constraint(None, 'joint_img', type_='foreignkey')
op.drop_column('joint_img', 'project_id')
# ### end Alembic commands ###
"""create table
Revision ID: 0d39b971db58
Revises: 39f0cd363bb8
Create Date: 2021-12-02 16:28:53.786687
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '0d39b971db58'
down_revision = '39f0cd363bb8'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('city', 'create_time',
existing_type=mysql.DATETIME(),
comment='创建时间',
existing_nullable=True)
op.alter_column('city', 'update_time',
existing_type=mysql.DATETIME(),
comment='更新时间',
existing_nullable=True)
op.alter_column('examine', 'create_time',
existing_type=mysql.DATETIME(),
comment='创建时间',
existing_nullable=True)
op.alter_column('examine', 'update_time',
existing_type=mysql.DATETIME(),
comment='更新时间',
existing_nullable=True)
op.alter_column('newproject', 'create_time',
existing_type=mysql.DATETIME(),
comment='创建时间',
existing_nullable=True)
op.alter_column('newproject', 'update_time',
existing_type=mysql.DATETIME(),
comment='更新时间',
existing_nullable=True)
op.alter_column('project', 'create_time',
existing_type=mysql.DATETIME(),
comment='创建时间',
existing_nullable=True)
op.alter_column('project', 'update_time',
existing_type=mysql.DATETIME(),
comment='更新时间',
existing_nullable=True)
op.create_table_comment(
'project',
'招商驾驶舱-重点招商项目表',
existing_comment='招商驾驶舱-重点项目表',
schema=None
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table_comment(
'project',
'招商驾驶舱-重点项目表',
existing_comment='招商驾驶舱-重点招商项目表',
schema=None
)
op.alter_column('project', 'update_time',
existing_type=mysql.DATETIME(),
comment=None,
existing_comment='更新时间',
existing_nullable=True)
op.alter_column('project', 'create_time',
existing_type=mysql.DATETIME(),
comment=None,
existing_comment='创建时间',
existing_nullable=True)
op.alter_column('newproject', 'update_time',
existing_type=mysql.DATETIME(),
comment=None,
existing_comment='更新时间',
existing_nullable=True)
op.alter_column('newproject', 'create_time',
existing_type=mysql.DATETIME(),
comment=None,
existing_comment='创建时间',
existing_nullable=True)
op.alter_column('examine', 'update_time',
existing_type=mysql.DATETIME(),
comment=None,
existing_comment='更新时间',
existing_nullable=True)
op.alter_column('examine', 'create_time',
existing_type=mysql.DATETIME(),
comment=None,
existing_comment='创建时间',
existing_nullable=True)
op.alter_column('city', 'update_time',
existing_type=mysql.DATETIME(),
comment=None,
existing_comment='更新时间',
existing_nullable=True)
op.alter_column('city', 'create_time',
existing_type=mysql.DATETIME(),
comment=None,
existing_comment='创建时间',
existing_nullable=True)
# ### end Alembic commands ###
"""empty message
Revision ID: 0faa9eac099f
Revises: 480d44ac277f
Create Date: 2022-12-29 11:02:35.440057
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '0faa9eac099f'
down_revision = '480d44ac277f'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('industry_distribute',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('industry_name', sa.String(length=20), nullable=True, comment='行业名称'),
sa.Column('industry_num', sa.Integer(), nullable=True, comment='个数'),
sa.Column('investment_volume', sa.Float(), nullable=True, comment='投资额(亿元)'),
sa.PrimaryKeyConstraint('id'),
comment='招商驾驶舱开工项目产业分布数据'
)
op.drop_table('industrydistribute')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('industrydistribute',
sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('industry_name', mysql.VARCHAR(length=20), nullable=True, comment='行业名称'),
sa.Column('industry_num', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='个数'),
sa.Column('investment_volume', mysql.FLOAT(), nullable=True, comment='投资额(亿元)'),
sa.PrimaryKeyConstraint('id'),
comment='招商驾驶舱开工项目产业分布数据',
mysql_comment='招商驾驶舱开工项目产业分布数据',
mysql_default_charset='utf8',
mysql_engine='InnoDB'
)
op.drop_table('industry_distribute')
# ### end Alembic commands ###
"""empty message
Revision ID: 10b496f3dd09
Revises: 168328e24456
Create Date: 2022-11-24 17:38:27.548876
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '10b496f3dd09'
down_revision = '168328e24456'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('shanxi_target', sa.Column('is_delete', sa.Integer(), nullable=True, comment='逻辑删除'))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('shanxi_target', 'is_delete')
# ### end Alembic commands ###
"""empty message
Revision ID: 1148aa49cc24
Revises: 6552335d82e5
Create Date: 2023-02-22 17:25:36.429391
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '1148aa49cc24'
down_revision = '6552335d82e5'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('carrier_factory', sa.Column('inside_picture_url', sa.String(length=255), nullable=True, comment='内部照片url'))
op.add_column('carrier_factory', sa.Column('outer_picture_url', sa.String(length=255), nullable=True, comment='外部照片url'))
op.alter_column('carrier_factory', 'price_url',
existing_type=mysql.VARCHAR(length=255),
comment='平面图url',
existing_comment='厂房图片url',
existing_nullable=True)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('carrier_factory', 'price_url',
existing_type=mysql.VARCHAR(length=255),
comment='厂房图片url',
existing_comment='平面图url',
existing_nullable=True)
op.drop_column('carrier_factory', 'outer_picture_url')
op.drop_column('carrier_factory', 'inside_picture_url')
# ### end Alembic commands ###
"""empty message
Revision ID: 1249c599d875
Revises: 4ee42e22970a
Create Date: 2023-02-21 14:44:15.869936
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '1249c599d875'
down_revision = '4ee42e22970a'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('introduction_meet',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('name', sa.String(length=20), nullable=True, comment='推介会名字'),
sa.Column('time', sa.String(length=100), nullable=True, comment='时间段'),
sa.Column('organizer', sa.String(length=20), nullable=True, comment='举办方'),
sa.Column('img_url', sa.String(length=255), nullable=True, comment='推介会封面'),
sa.Column('video_url', sa.String(length=255), nullable=True, comment='推介会介绍'),
sa.Column('info', sa.Text(), nullable=True, comment='推介会介绍'),
sa.PrimaryKeyConstraint('id'),
comment='推介会数据表'
)
op.create_table('investment_information',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('name', sa.String(length=20), nullable=True, comment='招商资讯名字'),
sa.Column('flag', sa.Integer(), nullable=True, comment='类型 1数据通报, 2工作动态'),
sa.Column('time', sa.String(length=100), nullable=True, comment='时间段'),
sa.Column('source', sa.String(length=20), nullable=True, comment='来源'),
sa.Column('info', sa.Text(), nullable=True, comment='介绍'),
sa.PrimaryKeyConstraint('id'),
comment='招商资讯数据表'
)
op.add_column('project', sa.Column('attract_industry', sa.String(length=255), nullable=True, comment='招引业态'))
op.add_column('zaiti_build', sa.Column('district', sa.String(length=50), nullable=True, comment='所属县区'))
op.add_column('zaiti_build', sa.Column('development_area', sa.String(length=50), nullable=True, comment='所属开发区'))
op.add_column('zaiti_build', sa.Column('level', sa.String(length=255), nullable=True, comment='写字楼等级(甲/乙/其他)'))
op.add_column('zaiti_build', sa.Column('address', sa.String(length=20), nullable=True, comment='详细地址(地址需填写准确、详细、精准)'))
op.add_column('zaiti_build', sa.Column('build_time', sa.String(length=20), nullable=True, comment='建成时间(年)'))
op.add_column('zaiti_build', sa.Column('land_area', sa.String(length=10), nullable=True, comment='总占地面积(㎡)'))
op.add_column('zaiti_build', sa.Column('build_area', sa.String(length=20), nullable=True, comment='总建筑面积(㎡)'))
op.add_column('zaiti_build', sa.Column('single_area', sa.String(length=20), nullable=True, comment='单层面积(㎡)'))
op.add_column('zaiti_build', sa.Column('empty_area', sa.String(length=20), nullable=True, comment='闲置面积(㎡)'))
op.add_column('zaiti_build', sa.Column('layer_num', sa.Integer(), nullable=True, comment='总层数'))
op.add_column('zaiti_build', sa.Column('carport', sa.Integer(), nullable=True, comment='车位(个)'))
op.add_column('zaiti_build', sa.Column('elevator', sa.Integer(), nullable=True, comment='电梯(部)'))
op.add_column('zaiti_build', sa.Column('is_water', sa.String(length=20), nullable=True, comment='是否已通水(是/否)'))
op.add_column('zaiti_build', sa.Column('is_electric', sa.String(length=20), nullable=True, comment='是否已通电(是/否)'))
op.add_column('zaiti_build', sa.Column('is_warm', sa.String(length=20), nullable=True, comment='是否已通暖(是/否)'))
op.add_column('zaiti_build', sa.Column('is_gas', sa.String(length=20), nullable=True, comment='是否已通燃气(是/否)'))
op.add_column('zaiti_build', sa.Column('is_internet', sa.String(length=20), nullable=True, comment='是否已通网络(是/否)'))
op.add_column('zaiti_build', sa.Column('is_divide', sa.String(length=20), nullable=True, comment='是否可以分割(是/否)'))
op.add_column('zaiti_build', sa.Column('attract_industry', sa.String(length=20), nullable=True, comment='拟招引产业'))
op.add_column('zaiti_build', sa.Column('cooperation_model', sa.String(length=20), nullable=True, comment='合作模式(出租/出售/转让)'))
op.add_column('zaiti_build', sa.Column('rent', sa.String(length=20), nullable=True, comment='租金(元/平米/天)'))
op.add_column('zaiti_build', sa.Column('property_fee', sa.String(length=20), nullable=True, comment='物业费(元/平米/月)'))
op.add_column('zaiti_build', sa.Column('linkman', sa.String(length=20), nullable=True, comment='联系人'))
op.add_column('zaiti_build', sa.Column('build_pic', sa.String(length=20), nullable=True, comment='楼宇图片'))
op.alter_column('zaiti_build', 'name',
existing_type=mysql.VARCHAR(length=20),
comment='楼宇名称',
existing_nullable=True)
op.alter_column('zaiti_build', 'buide_type',
existing_type=mysql.VARCHAR(length=20),
comment='楼宇类型(商铺/写字楼/其他)',
existing_nullable=True)
op.alter_column('zaiti_build', 'telephone',
existing_type=mysql.VARCHAR(length=20),
comment='联系方式',
existing_nullable=True)
op.drop_column('zaiti_build', 'navigat')
op.drop_column('zaiti_build', 'addr')
op.drop_column('zaiti_build', 'acreage')
op.drop_column('zaiti_build', 'navigator')
op.drop_column('zaiti_build', 'rate')
op.drop_column('zaiti_build', 'industry_type')
op.add_column('zaiti_factory', sa.Column('district', sa.String(length=50), nullable=True, comment='所属县区'))
op.add_column('zaiti_factory', sa.Column('development_area', sa.String(length=50), nullable=True, comment='所属开发区'))
op.add_column('zaiti_factory', sa.Column('buide_type', sa.String(length=20), nullable=True, comment='厂房类型(单层/多层/混合层)'))
op.add_column('zaiti_factory', sa.Column('is_standard', sa.String(length=20), nullable=True, comment='是否标准化厂房(是/否)'))
op.add_column('zaiti_factory', sa.Column('address', sa.String(length=50), nullable=True, comment='详细地址(地址需填写准确、详细、精准)'))
op.add_column('zaiti_factory', sa.Column('build_time', sa.String(length=20), nullable=True, comment='建成时间(年)'))
op.add_column('zaiti_factory', sa.Column('land_area', sa.String(length=20), nullable=True, comment='总占地面积(㎡)'))
op.add_column('zaiti_factory', sa.Column('build_area', sa.String(length=255), nullable=True, comment='总建筑面积(㎡)'))
op.add_column('zaiti_factory', sa.Column('empty_area', sa.String(length=20), nullable=True, comment='闲置面积(㎡)'))
op.add_column('zaiti_factory', sa.Column('layer_num', sa.String(length=20), nullable=True, comment='总层数'))
op.add_column('zaiti_factory', sa.Column('factory_structure', sa.String(length=20), nullable=True, comment='建筑结构(混凝土框架、钢结构、砖混、砖混钢筋、钢筋混凝土、轻钢)'))
op.add_column('zaiti_factory', sa.Column('width', sa.String(length=10), nullable=True, comment='跨度(m)'))
op.add_column('zaiti_factory', sa.Column('high', sa.String(length=20), nullable=True, comment='层高(m)'))
op.add_column('zaiti_factory', sa.Column('is_water', sa.String(length=20), nullable=True, comment='是否已通水(是/否)'))
op.add_column('zaiti_factory', sa.Column('is_electric', sa.String(length=20), nullable=True, comment='是否已通电(是/否)'))
op.add_column('zaiti_factory', sa.Column('is_warm', sa.String(length=20), nullable=True, comment='是否已通暖(是/否)'))
op.add_column('zaiti_factory', sa.Column('is_gas', sa.String(length=20), nullable=True, comment='是否已通燃气(是/否)'))
op.add_column('zaiti_factory', sa.Column('is_internet', sa.String(length=20), nullable=True, comment='是否已通网络(是/否)'))
op.add_column('zaiti_factory', sa.Column('is_car', sa.String(length=20), nullable=True, comment='是否可安装天车'))
op.add_column('zaiti_factory', sa.Column('elevator', sa.String(length=20), nullable=True, comment='电梯(部)'))
op.add_column('zaiti_factory', sa.Column('attract_industry', sa.String(length=20), nullable=True, comment='拟招引产业(下拉筛选)'))
op.add_column('zaiti_factory', sa.Column('settled_enterprise', sa.String(length=20), nullable=True, comment='已入驻企业(企业全称,使用面积)'))
op.add_column('zaiti_factory', sa.Column('cooperation_model', sa.String(length=20), nullable=True, comment='合作模式(出租/出售/转让)'))
op.add_column('zaiti_factory', sa.Column('rent', sa.String(length=20), nullable=True, comment='租金(元/平米/天)'))
op.add_column('zaiti_factory', sa.Column('linkman', sa.String(length=20), nullable=True, comment='联系人'))
op.add_column('zaiti_factory', sa.Column('factory_pic', sa.String(length=20), nullable=True, comment='厂房图片'))
op.alter_column('zaiti_factory', 'name',
existing_type=mysql.VARCHAR(length=20),
comment='厂房名称',
existing_nullable=True)
op.alter_column('zaiti_factory', 'bearing',
existing_type=mysql.VARCHAR(length=50),
comment='承重(kg/㎡)',
existing_nullable=True)
op.alter_column('zaiti_factory', 'telephone',
existing_type=mysql.VARCHAR(length=20),
comment='联系方式',
existing_nullable=True)
op.drop_column('zaiti_factory', 'height')
op.drop_column('zaiti_factory', 'navigat')
op.drop_column('zaiti_factory', 'other')
op.drop_column('zaiti_factory', 'structure')
op.drop_column('zaiti_factory', 'addr')
op.drop_column('zaiti_factory', 'acreage')
op.drop_column('zaiti_factory', 'navigator')
op.drop_column('zaiti_factory', 'factory_type')
op.drop_column('zaiti_factory', 'industry_type')
op.drop_column('zaiti_factory', 'new_level')
op.add_column('zaiti_land', sa.Column('code', sa.String(length=20), nullable=True, comment='土地编码'))
op.add_column('zaiti_land', sa.Column('district', sa.String(length=50), nullable=True, comment='所属县区'))
op.add_column('zaiti_land', sa.Column('development_area', sa.String(length=20), nullable=True, comment='所属开发区'))
op.add_column('zaiti_land', sa.Column('location', sa.String(length=50), nullable=True, comment='土地位置'))
op.add_column('zaiti_land', sa.Column('land_use', sa.String(length=255), nullable=True, comment='用地四至'))
op.add_column('zaiti_land', sa.Column('area', sa.String(length=255), nullable=True, comment='用地面积(净用地面积)(公顷)'))
op.add_column('zaiti_land', sa.Column('surface_area', sa.String(length=20), nullable=True, comment='地上控制建面(㎡)'))
op.add_column('zaiti_land', sa.Column('plot_ratio', sa.String(length=10), nullable=True, comment='容积率'))
op.add_column('zaiti_land', sa.Column('greening_rate', sa.String(length=20), nullable=True, comment='绿化率'))
op.add_column('zaiti_land', sa.Column('density', sa.String(length=20), nullable=True, comment='建筑密度'))
op.add_column('zaiti_land', sa.Column('height_permitted', sa.String(length=20), nullable=True, comment='限高(㎡)'))
op.add_column('zaiti_land', sa.Column('transfer_year', sa.String(length=20), nullable=True, comment='出让年限'))
op.add_column('zaiti_land', sa.Column('develop_degree', sa.String(length=20), nullable=True, comment='用地开发程度(请详细描述几通一平)'))
op.add_column('zaiti_land', sa.Column('investment_intensity', sa.String(length=20), nullable=True, comment='投资强度(万元/亩)'))
op.add_column('zaiti_land', sa.Column('output_intensity', sa.String(length=20), nullable=True, comment='产出强度(万元/亩)'))
op.add_column('zaiti_land', sa.Column('tax', sa.String(length=20), nullable=True, comment='地均税收(万元/亩)'))
op.add_column('zaiti_land', sa.Column('linkman', sa.String(length=20), nullable=True, comment='联系人'))
op.add_column('zaiti_land', sa.Column('red_line_map', sa.String(length=20), nullable=True, comment='用地红线图'))
op.add_column('zaiti_land', sa.Column('other_requirements', sa.String(length=20), nullable=True, comment='其他要求'))
op.alter_column('zaiti_land', 'name',
existing_type=mysql.VARCHAR(length=20),
comment='土地名称',
existing_nullable=True)
op.alter_column('zaiti_land', 'nature',
existing_type=mysql.VARCHAR(length=20),
comment='用地性质(工业用地/商服用地/物流仓储用地/科研用地/居住用地)(包括用地性质类别代码)',
existing_nullable=True)
op.alter_column('zaiti_land', 'telephone',
existing_type=mysql.VARCHAR(length=20),
comment='联系方式',
existing_nullable=True)
op.drop_column('zaiti_land', 'age_limit')
op.drop_column('zaiti_land', 'target')
op.drop_column('zaiti_land', 'navigat')
op.drop_column('zaiti_land', 'addr')
op.drop_column('zaiti_land', 'acreage')
op.drop_column('zaiti_land', 'navigator')
op.drop_column('zaiti_land', 'num')
op.drop_column('zaiti_land', 'industry_type')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('zaiti_land', sa.Column('industry_type', mysql.VARCHAR(length=255), nullable=True))
op.add_column('zaiti_land', sa.Column('num', mysql.VARCHAR(length=20), nullable=True))
op.add_column('zaiti_land', sa.Column('navigator', mysql.VARCHAR(length=10), nullable=True))
op.add_column('zaiti_land', sa.Column('acreage', mysql.VARCHAR(length=50), nullable=True))
op.add_column('zaiti_land', sa.Column('addr', mysql.VARCHAR(length=50), nullable=True))
op.add_column('zaiti_land', sa.Column('navigat', mysql.VARCHAR(length=20), nullable=True))
op.add_column('zaiti_land', sa.Column('target', mysql.VARCHAR(length=255), nullable=True))
op.add_column('zaiti_land', sa.Column('age_limit', mysql.VARCHAR(length=20), nullable=True))
op.alter_column('zaiti_land', 'telephone',
existing_type=mysql.VARCHAR(length=20),
comment=None,
existing_comment='联系方式',
existing_nullable=True)
op.alter_column('zaiti_land', 'nature',
existing_type=mysql.VARCHAR(length=20),
comment=None,
existing_comment='用地性质(工业用地/商服用地/物流仓储用地/科研用地/居住用地)(包括用地性质类别代码)',
existing_nullable=True)
op.alter_column('zaiti_land', 'name',
existing_type=mysql.VARCHAR(length=20),
comment=None,
existing_comment='土地名称',
existing_nullable=True)
op.drop_column('zaiti_land', 'other_requirements')
op.drop_column('zaiti_land', 'red_line_map')
op.drop_column('zaiti_land', 'linkman')
op.drop_column('zaiti_land', 'tax')
op.drop_column('zaiti_land', 'output_intensity')
op.drop_column('zaiti_land', 'investment_intensity')
op.drop_column('zaiti_land', 'develop_degree')
op.drop_column('zaiti_land', 'transfer_year')
op.drop_column('zaiti_land', 'height_permitted')
op.drop_column('zaiti_land', 'density')
op.drop_column('zaiti_land', 'greening_rate')
op.drop_column('zaiti_land', 'plot_ratio')
op.drop_column('zaiti_land', 'surface_area')
op.drop_column('zaiti_land', 'area')
op.drop_column('zaiti_land', 'land_use')
op.drop_column('zaiti_land', 'location')
op.drop_column('zaiti_land', 'development_area')
op.drop_column('zaiti_land', 'district')
op.drop_column('zaiti_land', 'code')
op.add_column('zaiti_factory', sa.Column('new_level', mysql.VARCHAR(length=20), nullable=True))
op.add_column('zaiti_factory', sa.Column('industry_type', mysql.VARCHAR(length=20), nullable=True))
op.add_column('zaiti_factory', sa.Column('factory_type', mysql.VARCHAR(length=20), nullable=True))
op.add_column('zaiti_factory', sa.Column('navigator', mysql.VARCHAR(length=10), nullable=True))
op.add_column('zaiti_factory', sa.Column('acreage', mysql.VARCHAR(length=50), nullable=True))
op.add_column('zaiti_factory', sa.Column('addr', mysql.VARCHAR(length=50), nullable=True))
op.add_column('zaiti_factory', sa.Column('structure', mysql.VARCHAR(length=20), nullable=True))
op.add_column('zaiti_factory', sa.Column('other', mysql.VARCHAR(length=255), nullable=True))
op.add_column('zaiti_factory', sa.Column('navigat', mysql.VARCHAR(length=20), nullable=True))
op.add_column('zaiti_factory', sa.Column('height', mysql.VARCHAR(length=20), nullable=True))
op.alter_column('zaiti_factory', 'telephone',
existing_type=mysql.VARCHAR(length=20),
comment=None,
existing_comment='联系方式',
existing_nullable=True)
op.alter_column('zaiti_factory', 'bearing',
existing_type=mysql.VARCHAR(length=50),
comment=None,
existing_comment='承重(kg/㎡)',
existing_nullable=True)
op.alter_column('zaiti_factory', 'name',
existing_type=mysql.VARCHAR(length=20),
comment=None,
existing_comment='厂房名称',
existing_nullable=True)
op.drop_column('zaiti_factory', 'factory_pic')
op.drop_column('zaiti_factory', 'linkman')
op.drop_column('zaiti_factory', 'rent')
op.drop_column('zaiti_factory', 'cooperation_model')
op.drop_column('zaiti_factory', 'settled_enterprise')
op.drop_column('zaiti_factory', 'attract_industry')
op.drop_column('zaiti_factory', 'elevator')
op.drop_column('zaiti_factory', 'is_car')
op.drop_column('zaiti_factory', 'is_internet')
op.drop_column('zaiti_factory', 'is_gas')
op.drop_column('zaiti_factory', 'is_warm')
op.drop_column('zaiti_factory', 'is_electric')
op.drop_column('zaiti_factory', 'is_water')
op.drop_column('zaiti_factory', 'high')
op.drop_column('zaiti_factory', 'width')
op.drop_column('zaiti_factory', 'factory_structure')
op.drop_column('zaiti_factory', 'layer_num')
op.drop_column('zaiti_factory', 'empty_area')
op.drop_column('zaiti_factory', 'build_area')
op.drop_column('zaiti_factory', 'land_area')
op.drop_column('zaiti_factory', 'build_time')
op.drop_column('zaiti_factory', 'address')
op.drop_column('zaiti_factory', 'is_standard')
op.drop_column('zaiti_factory', 'buide_type')
op.drop_column('zaiti_factory', 'development_area')
op.drop_column('zaiti_factory', 'district')
op.add_column('zaiti_build', sa.Column('industry_type', mysql.VARCHAR(length=255), nullable=True))
op.add_column('zaiti_build', sa.Column('rate', mysql.VARCHAR(length=20), nullable=True))
op.add_column('zaiti_build', sa.Column('navigator', mysql.VARCHAR(length=10), nullable=True))
op.add_column('zaiti_build', sa.Column('acreage', mysql.VARCHAR(length=50), nullable=True))
op.add_column('zaiti_build', sa.Column('addr', mysql.VARCHAR(length=50), nullable=True))
op.add_column('zaiti_build', sa.Column('navigat', mysql.VARCHAR(length=20), nullable=True))
op.alter_column('zaiti_build', 'telephone',
existing_type=mysql.VARCHAR(length=20),
comment=None,
existing_comment='联系方式',
existing_nullable=True)
op.alter_column('zaiti_build', 'buide_type',
existing_type=mysql.VARCHAR(length=20),
comment=None,
existing_comment='楼宇类型(商铺/写字楼/其他)',
existing_nullable=True)
op.alter_column('zaiti_build', 'name',
existing_type=mysql.VARCHAR(length=20),
comment=None,
existing_comment='楼宇名称',
existing_nullable=True)
op.drop_column('zaiti_build', 'build_pic')
op.drop_column('zaiti_build', 'linkman')
op.drop_column('zaiti_build', 'property_fee')
op.drop_column('zaiti_build', 'rent')
op.drop_column('zaiti_build', 'cooperation_model')
op.drop_column('zaiti_build', 'attract_industry')
op.drop_column('zaiti_build', 'is_divide')
op.drop_column('zaiti_build', 'is_internet')
op.drop_column('zaiti_build', 'is_gas')
op.drop_column('zaiti_build', 'is_warm')
op.drop_column('zaiti_build', 'is_electric')
op.drop_column('zaiti_build', 'is_water')
op.drop_column('zaiti_build', 'elevator')
op.drop_column('zaiti_build', 'carport')
op.drop_column('zaiti_build', 'layer_num')
op.drop_column('zaiti_build', 'empty_area')
op.drop_column('zaiti_build', 'single_area')
op.drop_column('zaiti_build', 'build_area')
op.drop_column('zaiti_build', 'land_area')
op.drop_column('zaiti_build', 'build_time')
op.drop_column('zaiti_build', 'address')
op.drop_column('zaiti_build', 'level')
op.drop_column('zaiti_build', 'development_area')
op.drop_column('zaiti_build', 'district')
op.drop_column('project', 'attract_industry')
op.drop_table('investment_information')
op.drop_table('introduction_meet')
# ### end Alembic commands ###
"""empty message
Revision ID: 12cd8a15569b
Revises: 1a74bd87ca85
Create Date: 2023-03-09 18:11:45.464796
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '12cd8a15569b'
down_revision = '1a74bd87ca85'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('company', sa.Column('register_org', sa.String(length=100), nullable=True, comment='登记机关'))
op.add_column('enterprise', sa.Column('register_org', sa.String(length=100), nullable=True, comment='登记机关'))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('enterprise', 'register_org')
op.drop_column('company', 'register_org')
# ### end Alembic commands ###
"""empty message
Revision ID: 168328e24456
Revises: 5faec18e77e2
Create Date: 2022-11-24 11:55:32.945235
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '168328e24456'
down_revision = '5faec18e77e2'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('shanxi_target', 'file_name')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('shanxi_target', sa.Column('file_name', mysql.VARCHAR(length=30), nullable=True, comment='文件名称'))
# ### end Alembic commands ###
"""empty message
Revision ID: 16fd9d84e92d
Revises: 6ab647f6d851
Create Date: 2023-02-23 16:56:07.078864
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '16fd9d84e92d'
down_revision = '6ab647f6d851'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('user_build',
sa.Column('create_time', sa.DateTime(), nullable=True, comment='创建时间'),
sa.Column('update_time', sa.DateTime(), nullable=True, comment='更新时间'),
sa.Column('user_id', sa.Integer(), nullable=False),
sa.Column('build_id', sa.Integer(), nullable=False),
sa.ForeignKeyConstraint(['build_id'], ['carrier_build.id'], ),
sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
sa.PrimaryKeyConstraint('user_id', 'build_id')
)
op.create_table('user_factory',
sa.Column('create_time', sa.DateTime(), nullable=True, comment='创建时间'),
sa.Column('update_time', sa.DateTime(), nullable=True, comment='更新时间'),
sa.Column('user_id', sa.Integer(), nullable=False),
sa.Column('factory_id', sa.Integer(), nullable=False),
sa.ForeignKeyConstraint(['factory_id'], ['carrier_factory.id'], ),
sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
sa.PrimaryKeyConstraint('user_id', 'factory_id')
)
op.create_table('user_land',
sa.Column('create_time', sa.DateTime(), nullable=True, comment='创建时间'),
sa.Column('update_time', sa.DateTime(), nullable=True, comment='更新时间'),
sa.Column('user_id', sa.Integer(), nullable=False),
sa.Column('land_id', sa.Integer(), nullable=False),
sa.ForeignKeyConstraint(['land_id'], ['carrier_land.id'], ),
sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
sa.PrimaryKeyConstraint('user_id', 'land_id')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('user_land')
op.drop_table('user_factory')
op.drop_table('user_build')
# ### end Alembic commands ###
"""create table
Revision ID: 1892550a14e5
Revises: 228d82192bf7
Create Date: 2021-12-02 15:07:54.976612
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1892550a14e5'
down_revision = '228d82192bf7'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table_comment(
'enterprise',
'全国企业',
existing_comment='压测资源表',
schema=None
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table_comment(
'enterprise',
'压测资源表',
existing_comment='全国企业',
schema=None
)
# ### end Alembic commands ###
"""empty message
Revision ID: 19ac0d1f0f55
Revises: 3aae2e3789ac
Create Date: 2023-02-03 10:09:38.818775
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '19ac0d1f0f55'
down_revision = '3aae2e3789ac'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('enterprise', 'capital',
existing_type=mysql.VARCHAR(length=255),
comment='注册资本,22万美元',
existing_comment='注册资本',
existing_nullable=True)
op.alter_column('enterprise', 'capital_id',
existing_type=mysql.INTEGER(display_width=11),
comment='注册资本大小类型,0-100,1,100-500,2,500-1000,3,1000-5000,4,5000-10000,5,10000+,6',
existing_comment='注册资本大小类型id,0-100,1,100-500,2,500-1000,3,1000-5000,4,5000-10000,5,10000+,6',
existing_nullable=True)
op.drop_constraint('enterprise_ibfk_1', 'enterprise', type_='foreignkey')
op.drop_column('enterprise', 'industry_chain_id')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('enterprise', sa.Column('industry_chain_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True))
op.create_foreign_key('enterprise_ibfk_1', 'enterprise', 'industry_chain', ['industry_chain_id'], ['id'])
op.alter_column('enterprise', 'capital_id',
existing_type=mysql.INTEGER(display_width=11),
comment='注册资本大小类型id,0-100,1,100-500,2,500-1000,3,1000-5000,4,5000-10000,5,10000+,6',
existing_comment='注册资本大小类型,0-100,1,100-500,2,500-1000,3,1000-5000,4,5000-10000,5,10000+,6',
existing_nullable=True)
op.alter_column('enterprise', 'capital',
existing_type=mysql.VARCHAR(length=255),
comment='注册资本',
existing_comment='注册资本,22万美元',
existing_nullable=True)
# ### end Alembic commands ###
"""empty message
Revision ID: 1a74bd87ca85
Revises: a6d8985e12da
Create Date: 2023-03-08 16:50:04.204668
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '1a74bd87ca85'
down_revision = 'a6d8985e12da'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('company_certificate',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='信息主键id'),
sa.Column('ent_id', sa.String(length=32), nullable=True, comment='企业id'),
sa.Column('start_date', sa.String(length=32), nullable=True, comment='发证时间'),
sa.Column('type', sa.String(length=32), nullable=True, comment='证书类型'),
sa.Column('cert_name', sa.String(length=32), nullable=True, comment='证书名称'),
sa.Column('cert_no', sa.String(length=32), nullable=True, comment='证书号'),
sa.Column('end_date', sa.String(length=32), nullable=True, comment='截止时间'),
sa.PrimaryKeyConstraint('id'),
comment='企业表资质证书'
)
op.create_table('company_client',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='企业客户主键id'),
sa.Column('ent_id', sa.String(length=32), nullable=True, comment='企业id'),
sa.Column('client_name', sa.String(length=32), nullable=True, comment='客户'),
sa.Column('ratio', sa.String(length=32), nullable=True, comment='销售占比'),
sa.Column('amount', sa.String(length=32), nullable=True, comment='销售金额'),
sa.Column('pub_date', sa.String(length=32), nullable=True, comment='公开时间'),
sa.Column('sources', sa.String(length=32), nullable=True, comment='数据来源'),
sa.Column('relation', sa.String(length=32), nullable=True, comment='关联关系'),
sa.PrimaryKeyConstraint('id'),
comment='企业客户数据表'
)
op.create_table('company_equity',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='股权出质主键id'),
sa.Column('ent_id', sa.String(length=32), nullable=True, comment='企业id'),
sa.Column('reg_number', sa.String(length=32), nullable=True, comment='等级编号'),
sa.Column('pledgor', sa.String(length=10), nullable=True, comment='出质人'),
sa.Column('target_company', sa.String(length=25), nullable=True, comment='出质股权的企业'),
sa.Column('pledgee', sa.String(length=10), nullable=True, comment='质权人'),
sa.Column('amount', sa.String(length=32), nullable=True, comment='出质股权数额(万元)'),
sa.Column('pub_date', sa.String(length=32), nullable=True, comment='登记日期'),
sa.Column('status', sa.String(length=10), nullable=True, comment='状态'),
sa.PrimaryKeyConstraint('id'),
comment='企业详情股权出质'
)
op.create_table('company_inout_info',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='企业进出口信用主键id'),
sa.Column('ent_id', sa.String(length=32), nullable=True, comment='企业id'),
sa.Column('customs_registered_address', sa.String(length=32), nullable=True, comment='注册海关'),
sa.Column('management_category', sa.String(length=32), nullable=True, comment='经营类别'),
sa.Column('record_date', sa.DateTime(), nullable=True, comment='注册日期'),
sa.Column('industry_category', sa.String(length=32), nullable=True, comment='行业类别'),
sa.PrimaryKeyConstraint('id'),
comment='企业进出口信用数据表'
)
op.create_table('company_licence',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='企业行政许可主键id'),
sa.Column('ent_id', sa.String(length=32), nullable=True, comment='企业id'),
sa.Column('licence_no', sa.String(length=32), nullable=True, comment='企业行政许可编号'),
sa.Column('licence_name', sa.String(length=32), nullable=True, comment='企业行政许可证名称'),
sa.Column('from_date', sa.String(length=32), nullable=True, comment='有效期自'),
sa.Column('end_date', sa.String(length=32), nullable=True, comment='有效期至'),
sa.Column('license_org', sa.String(length=32), nullable=True, comment='许可机关'),
sa.Column('licence_content', sa.String(length=32), nullable=True, comment='许可内容'),
sa.Column('source', sa.String(length=32), nullable=True, comment='来源'),
sa.PrimaryKeyConstraint('id'),
comment='企业行政许可数据表'
)
op.create_table('company_punish',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='信息主键id'),
sa.Column('ent_id', sa.String(length=32), nullable=True, comment='企业id'),
sa.Column('pub_date', sa.String(length=32), nullable=True, comment='公开日期'),
sa.Column('punish_no', sa.String(length=32), nullable=True, comment='处罚日期'),
sa.Column('punish_reason', sa.String(length=32), nullable=True, comment='决定文书号'),
sa.Column('punish_content', sa.String(length=32), nullable=True, comment='处罚事由/违法行为类型'),
sa.Column('punish_org', sa.String(length=32), nullable=True, comment='处罚结果/内容'),
sa.Column('sources', sa.String(length=32), nullable=True, comment='处罚单位'),
sa.PrimaryKeyConstraint('id'),
comment='企业表行政处罚'
)
op.create_table('company_tax_info',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='企业税务信用主键id'),
sa.Column('ent_id', sa.String(length=32), nullable=True, comment='企业id'),
sa.Column('name', sa.String(length=32), nullable=True, comment='名称'),
sa.Column('year', sa.String(length=32), nullable=True, comment='评价年度'),
sa.Column('id_number', sa.String(length=32), nullable=True, comment='纳税人识别号'),
sa.Column('grade', sa.String(length=32), nullable=True, comment='纳税信用等级'),
sa.Column('eval_department', sa.String(length=32), nullable=True, comment='单位评价'),
sa.Column('type', sa.String(length=32), nullable=True, comment='类型'),
sa.Column('business_id', sa.String(length=32), nullable=True, comment='数据id'),
sa.PrimaryKeyConstraint('id'),
comment='企业税务信用数据表'
)
op.create_table('enterprise_certificate',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='专利信息主键id'),
sa.Column('ent_id', sa.String(length=32), nullable=True, comment='企业id'),
sa.Column('start_date', sa.String(length=32), nullable=True, comment='发证时间'),
sa.Column('type', sa.String(length=32), nullable=True, comment='证书类型'),
sa.Column('cert_name', sa.String(length=32), nullable=True, comment='证书名称'),
sa.Column('cert_no', sa.String(length=32), nullable=True, comment='证书号'),
sa.Column('end_date', sa.String(length=32), nullable=True, comment='截止时间'),
sa.PrimaryKeyConstraint('id'),
comment='全国企业表资质证书'
)
op.create_table('enterprise_client',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='企业客户主键id'),
sa.Column('ent_id', sa.String(length=32), nullable=True, comment='企业id'),
sa.Column('client_name', sa.String(length=32), nullable=True, comment='客户'),
sa.Column('ratio', sa.String(length=32), nullable=True, comment='销售占比'),
sa.Column('amount', sa.String(length=32), nullable=True, comment='销售金额'),
sa.Column('pub_date', sa.String(length=32), nullable=True, comment='公开时间'),
sa.Column('sources', sa.String(length=32), nullable=True, comment='数据来源'),
sa.Column('relation', sa.String(length=32), nullable=True, comment='关联关系'),
sa.PrimaryKeyConstraint('id'),
comment='全国企业表企业客户数据表'
)
op.create_table('enterprise_equity',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='股权出质主键id'),
sa.Column('ent_id', sa.String(length=32), nullable=True, comment='企业id'),
sa.Column('reg_number', sa.String(length=32), nullable=True, comment='等级编号'),
sa.Column('pledgor', sa.String(length=10), nullable=True, comment='出质人'),
sa.Column('target_company', sa.String(length=25), nullable=True, comment='出质股权的企业'),
sa.Column('pledgee', sa.String(length=10), nullable=True, comment='质权人'),
sa.Column('amount', sa.String(length=32), nullable=True, comment='出质股权数额(万元)'),
sa.Column('pub_date', sa.String(length=32), nullable=True, comment='登记日期'),
sa.Column('status', sa.String(length=10), nullable=True, comment='状态'),
sa.PrimaryKeyConstraint('id'),
comment='全国企业表企业详情股权出质'
)
op.create_table('enterprise_inout_info',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='企业进出口信用主键id'),
sa.Column('ent_id', sa.String(length=32), nullable=True, comment='企业id'),
sa.Column('customs_registered_address', sa.String(length=32), nullable=True, comment='注册海关'),
sa.Column('management_category', sa.String(length=32), nullable=True, comment='经营类别'),
sa.Column('record_date', sa.DateTime(), nullable=True, comment='注册日期'),
sa.Column('industry_category', sa.String(length=32), nullable=True, comment='行业类别'),
sa.PrimaryKeyConstraint('id'),
comment='全国企业表企业进出口信用数据表'
)
op.create_table('enterprise_licence',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='企业行政许可主键id'),
sa.Column('ent_id', sa.String(length=32), nullable=True, comment='企业id'),
sa.Column('licence_no', sa.String(length=32), nullable=True, comment='企业行政许可编号'),
sa.Column('licence_name', sa.String(length=32), nullable=True, comment='企业行政许可证名称'),
sa.Column('from_date', sa.String(length=32), nullable=True, comment='有效期自'),
sa.Column('end_date', sa.String(length=32), nullable=True, comment='有效期至'),
sa.Column('license_org', sa.String(length=32), nullable=True, comment='许可机关'),
sa.Column('licence_content', sa.String(length=32), nullable=True, comment='许可内容'),
sa.Column('source', sa.String(length=32), nullable=True, comment='来源'),
sa.PrimaryKeyConstraint('id'),
comment='全国企业表企业行政许可数据表'
)
op.create_table('enterprise_punish',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='专利信息主键id'),
sa.Column('ent_id', sa.String(length=32), nullable=True, comment='企业id'),
sa.Column('pub_date', sa.String(length=32), nullable=True, comment='公开日期'),
sa.Column('punish_no', sa.String(length=32), nullable=True, comment='处罚日期'),
sa.Column('punish_reason', sa.String(length=32), nullable=True, comment='决定文书号'),
sa.Column('punish_content', sa.String(length=32), nullable=True, comment='处罚事由/违法行为类型'),
sa.Column('punish_org', sa.String(length=32), nullable=True, comment='处罚结果/内容'),
sa.Column('sources', sa.String(length=32), nullable=True, comment='处罚单位'),
sa.PrimaryKeyConstraint('id'),
comment='全国企业表行政处罚'
)
op.create_table('enterprise_tax_info',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='企业税务信用主键id'),
sa.Column('ent_id', sa.String(length=32), nullable=True, comment='企业id'),
sa.Column('name', sa.String(length=32), nullable=True, comment='名称'),
sa.Column('year', sa.String(length=32), nullable=True, comment='评价年度'),
sa.Column('id_number', sa.String(length=32), nullable=True, comment='纳税人识别号'),
sa.Column('grade', sa.String(length=32), nullable=True, comment='纳税信用等级'),
sa.Column('eval_department', sa.String(length=32), nullable=True, comment='单位评价'),
sa.Column('type', sa.String(length=32), nullable=True, comment='类型'),
sa.Column('business_id', sa.String(length=32), nullable=True, comment='数据id'),
sa.PrimaryKeyConstraint('id'),
comment='全国企业表企业税务信用数据表'
)
op.drop_table('company_tax_credit')
op.drop_table('company_customer')
op.drop_table('enterprise_admin_permission')
op.drop_table('enterprise_tax_credit')
op.drop_table('enterprise_stock')
op.drop_table('enterprise_import_export')
op.drop_table('enterprise_customer')
op.drop_table('company_stock')
op.drop_table('company_admin_permission')
op.drop_table('company_import_export')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('company_import_export',
sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False, comment='企业进出口信用主键id'),
sa.Column('ent_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='企业id'),
sa.Column('customs_registered_address', mysql.VARCHAR(length=32), nullable=True, comment='注册海关'),
sa.Column('management_category', mysql.VARCHAR(length=32), nullable=True, comment='经营类别'),
sa.Column('record_date', mysql.DATETIME(), nullable=True, comment='注册日期'),
sa.Column('industry_category', mysql.VARCHAR(length=32), nullable=True, comment='行业类别'),
sa.PrimaryKeyConstraint('id'),
comment='企业进出口信用数据表',
mysql_comment='企业进出口信用数据表',
mysql_default_charset='utf8',
mysql_engine='InnoDB'
)
op.create_table('company_admin_permission',
sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False, comment='企业行政许可主键id'),
sa.Column('source', mysql.VARCHAR(length=32), nullable=True, comment='来源'),
sa.Column('ent_id', mysql.VARCHAR(length=32), nullable=True, comment='企业id'),
sa.Column('licence_no', mysql.VARCHAR(length=32), nullable=True, comment='企业行政许可编号'),
sa.Column('licence_name', mysql.VARCHAR(length=32), nullable=True, comment='企业行政许可证名称'),
sa.Column('from_date', mysql.VARCHAR(length=32), nullable=True, comment='有效期自'),
sa.Column('end_date', mysql.VARCHAR(length=32), nullable=True, comment='有效期至'),
sa.Column('license_org', mysql.VARCHAR(length=32), nullable=True, comment='许可机关'),
sa.Column('licence_content', mysql.VARCHAR(length=32), nullable=True, comment='许可内容'),
sa.PrimaryKeyConstraint('id'),
comment='企业行政许可数据表',
mysql_comment='企业行政许可数据表',
mysql_default_charset='utf8',
mysql_engine='InnoDB'
)
op.create_table('company_stock',
sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False, comment='股权出质主键id'),
sa.Column('pledgee', mysql.VARCHAR(length=10), nullable=True, comment='质权人'),
sa.Column('amount', mysql.FLOAT(), nullable=True, comment='出质股权数额(万元)'),
sa.Column('status', mysql.VARCHAR(length=10), nullable=True, comment='状态'),
sa.Column('ent_id', mysql.VARCHAR(length=32), nullable=True, comment='企业id'),
sa.Column('reg_number', mysql.VARCHAR(length=32), nullable=True, comment='等级编号'),
sa.Column('pledgor', mysql.VARCHAR(length=10), nullable=True, comment='出质人'),
sa.Column('target_company', mysql.VARCHAR(length=25), nullable=True, comment='出质股权的企业'),
sa.Column('pub_date', mysql.VARCHAR(length=32), nullable=True, comment='登记日期'),
sa.PrimaryKeyConstraint('id'),
comment='企业详情股权出质',
mysql_comment='企业详情股权出质',
mysql_default_charset='utf8',
mysql_engine='InnoDB'
)
op.create_table('enterprise_customer',
sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False, comment='企业客户主键id'),
sa.Column('relation', mysql.VARCHAR(length=32), nullable=True, comment='关联关系'),
sa.Column('ent_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='企业id'),
sa.Column('client_name', mysql.VARCHAR(length=32), nullable=True, comment='客户'),
sa.Column('ratio', mysql.VARCHAR(length=32), nullable=True, comment='销售占比'),
sa.Column('amount', mysql.VARCHAR(length=32), nullable=True, comment='销售金额'),
sa.Column('pub_date', mysql.DATETIME(), nullable=True, comment='公开时间'),
sa.Column('sources', mysql.VARCHAR(length=32), nullable=True, comment='数据来源'),
sa.PrimaryKeyConstraint('id'),
comment='全国企业表企业客户数据表',
mysql_comment='全国企业表企业客户数据表',
mysql_default_charset='utf8',
mysql_engine='InnoDB'
)
op.create_table('enterprise_import_export',
sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False, comment='企业进出口信用主键id'),
sa.Column('ent_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='企业id'),
sa.Column('customs_registered_address', mysql.VARCHAR(length=32), nullable=True, comment='注册海关'),
sa.Column('management_category', mysql.VARCHAR(length=32), nullable=True, comment='经营类别'),
sa.Column('record_date', mysql.DATETIME(), nullable=True, comment='注册日期'),
sa.Column('industry_category', mysql.VARCHAR(length=32), nullable=True, comment='行业类别'),
sa.PrimaryKeyConstraint('id'),
comment='全国企业表企业进出口信用数据表',
mysql_comment='全国企业表企业进出口信用数据表',
mysql_default_charset='utf8',
mysql_engine='InnoDB'
)
op.create_table('enterprise_stock',
sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False, comment='股权出质主键id'),
sa.Column('pledgee', mysql.VARCHAR(length=10), nullable=True, comment='质权人'),
sa.Column('amount', mysql.FLOAT(), nullable=True, comment='出质股权数额(万元)'),
sa.Column('status', mysql.VARCHAR(length=10), nullable=True, comment='状态'),
sa.Column('ent_id', mysql.VARCHAR(length=32), nullable=True, comment='企业id'),
sa.Column('reg_number', mysql.VARCHAR(length=32), nullable=True, comment='等级编号'),
sa.Column('pledgor', mysql.VARCHAR(length=10), nullable=True, comment='出质人'),
sa.Column('target_company', mysql.VARCHAR(length=25), nullable=True, comment='出质股权的企业'),
sa.Column('pub_date', mysql.VARCHAR(length=32), nullable=True, comment='登记日期'),
sa.PrimaryKeyConstraint('id'),
comment='全国企业表企业详情股权出质',
mysql_comment='全国企业表企业详情股权出质',
mysql_default_charset='utf8',
mysql_engine='InnoDB'
)
op.create_table('enterprise_tax_credit',
sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False, comment='企业税务信用主键id'),
sa.Column('ent_id', mysql.VARCHAR(length=32), nullable=True, comment='企业id'),
sa.Column('name', mysql.VARCHAR(length=32), nullable=True, comment='名称'),
sa.Column('year', mysql.VARCHAR(length=32), nullable=True, comment='评价年度'),
sa.Column('id_number', mysql.VARCHAR(length=32), nullable=True, comment='纳税人识别号'),
sa.Column('grade', mysql.VARCHAR(length=32), nullable=True, comment='纳税信用等级'),
sa.Column('eval_department', mysql.VARCHAR(length=32), nullable=True, comment='单位评价'),
sa.Column('type', mysql.VARCHAR(length=32), nullable=True, comment='类型'),
sa.Column('business_id', mysql.VARCHAR(length=32), nullable=True, comment='数据id'),
sa.PrimaryKeyConstraint('id'),
comment='全国企业表企业税务信用数据表',
mysql_comment='全国企业表企业税务信用数据表',
mysql_default_charset='utf8',
mysql_engine='InnoDB'
)
op.create_table('enterprise_admin_permission',
sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False, comment='企业行政许可主键id'),
sa.Column('source', mysql.VARCHAR(length=32), nullable=True, comment='来源'),
sa.Column('ent_id', mysql.VARCHAR(length=32), nullable=True, comment='企业id'),
sa.Column('licence_no', mysql.VARCHAR(length=32), nullable=True, comment='企业行政许可编号'),
sa.Column('licence_name', mysql.VARCHAR(length=32), nullable=True, comment='企业行政许可证名称'),
sa.Column('from_date', mysql.VARCHAR(length=32), nullable=True, comment='有效期自'),
sa.Column('end_date', mysql.VARCHAR(length=32), nullable=True, comment='有效期至'),
sa.Column('license_org', mysql.VARCHAR(length=32), nullable=True, comment='许可机关'),
sa.Column('licence_content', mysql.VARCHAR(length=32), nullable=True, comment='许可内容'),
sa.PrimaryKeyConstraint('id'),
comment='全国企业表企业行政许可数据表',
mysql_comment='全国企业表企业行政许可数据表',
mysql_default_charset='utf8',
mysql_engine='InnoDB'
)
op.create_table('company_customer',
sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False, comment='企业客户主键id'),
sa.Column('relation', mysql.VARCHAR(length=32), nullable=True, comment='关联关系'),
sa.Column('ent_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='企业id'),
sa.Column('client_name', mysql.VARCHAR(length=32), nullable=True, comment='客户'),
sa.Column('ratio', mysql.VARCHAR(length=32), nullable=True, comment='销售占比'),
sa.Column('amount', mysql.VARCHAR(length=32), nullable=True, comment='销售金额'),
sa.Column('pub_date', mysql.DATETIME(), nullable=True, comment='公开时间'),
sa.Column('sources', mysql.VARCHAR(length=32), nullable=True, comment='数据来源'),
sa.PrimaryKeyConstraint('id'),
comment='企业客户数据表',
mysql_comment='企业客户数据表',
mysql_default_charset='utf8',
mysql_engine='InnoDB'
)
op.create_table('company_tax_credit',
sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False, comment='企业税务信用主键id'),
sa.Column('ent_id', mysql.VARCHAR(length=32), nullable=True, comment='企业id'),
sa.Column('name', mysql.VARCHAR(length=32), nullable=True, comment='名称'),
sa.Column('year', mysql.VARCHAR(length=32), nullable=True, comment='评价年度'),
sa.Column('id_number', mysql.VARCHAR(length=32), nullable=True, comment='纳税人识别号'),
sa.Column('grade', mysql.VARCHAR(length=32), nullable=True, comment='纳税信用等级'),
sa.Column('eval_department', mysql.VARCHAR(length=32), nullable=True, comment='单位评价'),
sa.Column('type', mysql.VARCHAR(length=32), nullable=True, comment='类型'),
sa.Column('business_id', mysql.VARCHAR(length=32), nullable=True, comment='数据id'),
sa.PrimaryKeyConstraint('id'),
comment='企业税务信用数据表',
mysql_comment='企业税务信用数据表',
mysql_default_charset='utf8',
mysql_engine='InnoDB'
)
op.drop_table('enterprise_tax_info')
op.drop_table('enterprise_punish')
op.drop_table('enterprise_licence')
op.drop_table('enterprise_inout_info')
op.drop_table('enterprise_equity')
op.drop_table('enterprise_client')
op.drop_table('enterprise_certificate')
op.drop_table('company_tax_info')
op.drop_table('company_punish')
op.drop_table('company_licence')
op.drop_table('company_inout_info')
op.drop_table('company_equity')
op.drop_table('company_client')
op.drop_table('company_certificate')
# ### end Alembic commands ###
"""empty message
Revision ID: 1b90a0436228
Revises: 34fd2628b8f0
Create Date: 2023-02-02 15:45:32.961356
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '1b90a0436228'
down_revision = '34fd2628b8f0'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('enterprise', 'product_all1')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('enterprise', sa.Column('product_all1', mysql.VARCHAR(length=255), nullable=True, comment='公司拥有产品'))
# ### end Alembic commands ###
"""empty message
Revision ID: 1ba77e435ccc
Revises: 1ff7d07e030c
Create Date: 2022-12-04 14:58:25.890782
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1ba77e435ccc'
down_revision = '1ff7d07e030c'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('user_company',
sa.Column('create_time', sa.DateTime(), nullable=True, comment='创建时间'),
sa.Column('update_time', sa.DateTime(), nullable=True, comment='更新时间'),
sa.Column('user_id', sa.Integer(), nullable=False),
sa.Column('company_id', sa.Integer(), nullable=False),
sa.ForeignKeyConstraint(['company_id'], ['company.id'], ),
sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
sa.PrimaryKeyConstraint('user_id', 'company_id')
)
op.create_table('user_enterprise',
sa.Column('create_time', sa.DateTime(), nullable=True, comment='创建时间'),
sa.Column('update_time', sa.DateTime(), nullable=True, comment='更新时间'),
sa.Column('user_id', sa.Integer(), nullable=False),
sa.Column('enterprise_id', sa.Integer(), nullable=False),
sa.ForeignKeyConstraint(['enterprise_id'], ['enterprise.id'], ),
sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
sa.PrimaryKeyConstraint('user_id', 'enterprise_id')
)
op.create_table('user_industry',
sa.Column('create_time', sa.DateTime(), nullable=True, comment='创建时间'),
sa.Column('update_time', sa.DateTime(), nullable=True, comment='更新时间'),
sa.Column('user_id', sa.Integer(), nullable=False),
sa.Column('industry_id', sa.Integer(), nullable=False),
sa.ForeignKeyConstraint(['industry_id'], ['industry.id'], ),
sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
sa.PrimaryKeyConstraint('user_id', 'industry_id')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('user_industry')
op.drop_table('user_enterprise')
op.drop_table('user_company')
# ### end Alembic commands ###
"""empty message
Revision ID: 1c2f6dbb41a4
Revises: 48b5fb3c737c
Create Date: 2023-03-02 14:49:09.561091
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '1c2f6dbb41a4'
down_revision = '48b5fb3c737c'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('user_project', sa.Column('project_id', sa.Integer(), nullable=False))
op.drop_constraint('user_project_ibfk_1', 'user_project', type_='foreignkey')
op.create_foreign_key(None, 'user_project', 'project', ['project_id'], ['id'])
op.drop_column('user_project', 'factory_id')
op.add_column('user_zone', sa.Column('zone_id', sa.Integer(), nullable=False))
op.drop_constraint('user_zone_ibfk_1', 'user_zone', type_='foreignkey')
op.create_foreign_key(None, 'user_zone', 'induzone', ['zone_id'], ['id'])
op.drop_column('user_zone', 'factory_id')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('user_zone', sa.Column('factory_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=False))
op.drop_constraint(None, 'user_zone', type_='foreignkey')
op.create_foreign_key('user_zone_ibfk_1', 'user_zone', 'induzone', ['factory_id'], ['id'])
op.drop_column('user_zone', 'zone_id')
op.add_column('user_project', sa.Column('factory_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=False))
op.drop_constraint(None, 'user_project', type_='foreignkey')
op.create_foreign_key('user_project_ibfk_1', 'user_project', 'project', ['factory_id'], ['id'])
op.drop_column('user_project', 'project_id')
# ### end Alembic commands ###
"""empty message
Revision ID: 1e56d07b5625
Revises: 653e364e2467
Create Date: 2023-01-05 15:20:35.945953
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '1e56d07b5625'
down_revision = '653e364e2467'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('industry_chain', 'icon_url',
existing_type=mysql.VARCHAR(length=255),
comment='选中时行业图标',
existing_comment='行业图标',
existing_nullable=True)
op.alter_column('industry_chain', 'icon_url1',
existing_type=mysql.VARCHAR(length=255),
comment='未选中时行业图标',
existing_comment='未选中时行业图标1',
existing_nullable=True)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('industry_chain', 'icon_url1',
existing_type=mysql.VARCHAR(length=255),
comment='未选中时行业图标1',
existing_comment='未选中时行业图标',
existing_nullable=True)
op.alter_column('industry_chain', 'icon_url',
existing_type=mysql.VARCHAR(length=255),
comment='行业图标',
existing_comment='选中时行业图标',
existing_nullable=True)
# ### end Alembic commands ###
"""create table
Revision ID: 1edbd9516fdc
Revises: 0d39b971db58
Create Date: 2021-12-02 16:59:12.072185
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '1edbd9516fdc'
down_revision = '0d39b971db58'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('company', 'sxmon',
existing_type=mysql.VARCHAR(length=32),
comment='是否山西民营100强',
existing_comment='是否山西民营100强(2019年)',
existing_nullable=True)
op.alter_column('company', 'takingn',
existing_type=mysql.FLOAT(),
comment='营收 (万元)',
existing_comment='2019营收 (万元)',
existing_nullable=True)
op.alter_column('company', 'ouputn',
existing_type=mysql.FLOAT(),
comment='年产值',
existing_comment='2019年产值',
existing_nullable=True)
op.alter_column('company', 'profit',
existing_type=mysql.FLOAT(),
comment='公司利润(万元)',
existing_comment='2019公司利润(万元)',
existing_nullable=True)
op.alter_column('industry', 'nid',
existing_type=mysql.INTEGER(display_width=11),
comment='导航id(对应企业数据表中的f_type)',
existing_comment='导航id(导航在企业数据中的id)',
existing_nullable=True)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('industry', 'nid',
existing_type=mysql.INTEGER(display_width=11),
comment='导航id(导航在企业数据中的id)',
existing_comment='导航id(对应企业数据表中的f_type)',
existing_nullable=True)
op.alter_column('company', 'profit',
existing_type=mysql.FLOAT(),
comment='2019公司利润(万元)',
existing_comment='公司利润(万元)',
existing_nullable=True)
op.alter_column('company', 'ouputn',
existing_type=mysql.FLOAT(),
comment='2019年产值',
existing_comment='年产值',
existing_nullable=True)
op.alter_column('company', 'takingn',
existing_type=mysql.FLOAT(),
comment='2019营收 (万元)',
existing_comment='营收 (万元)',
existing_nullable=True)
op.alter_column('company', 'sxmon',
existing_type=mysql.VARCHAR(length=32),
comment='是否山西民营100强(2019年)',
existing_comment='是否山西民营100强',
existing_nullable=True)
# ### end Alembic commands ###
"""empty message
Revision ID: 1ff7d07e030c
Revises: 25886ec607fa
Create Date: 2022-12-04 14:32:16.229721
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1ff7d07e030c'
down_revision = '25886ec607fa'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('industry_collect', sa.Column('industry_id', sa.Integer(), nullable=True, comment='产业id'))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('industry_collect', 'industry_id')
# ### end Alembic commands ###
"""empty message
Revision ID: 21bedb912ce7
Revises: f0d08e2d1ce5
Create Date: 2022-11-21 16:57:53.310452
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '21bedb912ce7'
down_revision = 'f0d08e2d1ce5'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('project_management',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('project_stalker', sa.String(length=30), nullable=True, comment='项目跟踪'),
sa.Column('project_name', sa.String(length=30), nullable=True, comment='项目名称'),
sa.Column('district', sa.String(length=20), nullable=True, comment='项目所在地'),
sa.Column('development_area', sa.String(length=20), nullable=True, comment='开发区'),
sa.Column('attract_name', sa.String(length=30), nullable=True, comment='引资方名称'),
sa.Column('investor_name', sa.String(length=30), nullable=True, comment='投资方名称'),
sa.Column('investor_district', sa.String(length=30), nullable=True, comment='投资方所在地'),
sa.Column('industry', sa.String(length=20), nullable=True, comment='所属行业'),
sa.Column('investment_volume', sa.Float(), nullable=True, comment='总投资额(万元)'),
sa.Column('construction_content', sa.String(length=30), nullable=True, comment='建设内容'),
sa.Column('project_address', sa.String(length=20), nullable=True, comment='项目选址'),
sa.Column('project_progress', sa.String(length=30), nullable=True, comment='项目进展'),
sa.Column('project_problem', sa.String(length=255), nullable=True, comment='难点情况'),
sa.Column('project_year', sa.Integer(), nullable=True, comment='项目年份'),
sa.Column('upload_unity', sa.String(length=20), nullable=True, comment='上传部门'),
sa.Column('upload_people', sa.String(length=20), nullable=True, comment='上传人'),
sa.Column('upload_time', sa.DateTime(), nullable=True, comment='上传时间'),
sa.Column('project_num', sa.String(length=30), nullable=True, comment='项目编号'),
sa.Column('project_source', sa.String(length=20), nullable=True, comment='项目来源'),
sa.Column('project_unity', sa.String(length=20), nullable=True, comment='项目申报单位'),
sa.Column('is_development_project', sa.String(length=20), nullable=True, comment='是否属于开发区项目'),
sa.Column('sign_time', sa.DateTime(), nullable=True, comment='签约时间'),
sa.Column('start_time', sa.DateTime(), nullable=True, comment='开工时间'),
sa.Column('end_time', sa.DateTime(), nullable=True, comment='竣工时间'),
sa.Column('investor_rank', sa.String(length=30), nullable=True, comment='投资方排名'),
sa.Column('is_transf_project', sa.String(length=30), nullable=True, comment='是否转型项目'),
sa.Column('country', sa.String(length=30), nullable=True, comment='投资方国别'),
sa.Column('provence', sa.String(length=30), nullable=True, comment='投资方省份'),
sa.Column('city', sa.String(length=30), nullable=True, comment='投资方市'),
sa.Column('job_num', sa.Integer(), nullable=True, comment='带动就业岗位(个)'),
sa.Column('new_value', sa.Float(), nullable=True, comment='新增产值(亿元)'),
sa.Column('revenue', sa.Float(), nullable=True, comment='贡献税收(亿元)'),
sa.Column('use_land', sa.String(length=30), nullable=True, comment='项目用地情况(亩)'),
sa.Column('new_land', sa.String(length=30), nullable=True, comment='其中新增用地(亩)'),
sa.Column('construction_nature', sa.String(length=30), nullable=True, comment='建设性质(亩)'),
sa.Column('is_fixed_investment', sa.String(length=30), nullable=True, comment='固定资产投资项目'),
sa.Column('investment_year', sa.String(length=20), nullable=True, comment='资金到位本年累计(万元)'),
sa.Column('investment_history', sa.String(length=20), nullable=True, comment='资金到位历史累计(万元)'),
sa.Column('cooperation_way', sa.String(length=20), nullable=True, comment='合作方式'),
sa.Column('set_project_status', sa.String(length=20), nullable=True, comment='项目立项状态'),
sa.Column('investor_people', sa.String(length=30), nullable=True, comment='投资方联系人'),
sa.Column('investor_mobile', sa.String(length=30), nullable=True, comment='投资方电话'),
sa.Column('investor_address', sa.String(length=30), nullable=True, comment='投资方联系地址'),
sa.PrimaryKeyConstraint('id'),
comment='项目化管理-项目信息表'
)
op.alter_column('siku_project', 'sign_explain',
existing_type=mysql.VARCHAR(length=255),
comment='签约方式说明',
existing_comment='其他签约说明',
existing_nullable=True)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('siku_project', 'sign_explain',
existing_type=mysql.VARCHAR(length=255),
comment='其他签约说明',
existing_comment='签约方式说明',
existing_nullable=True)
op.drop_table('project_management')
# ### end Alembic commands ###
"""create table
Revision ID: 228d82192bf7
Revises:
Create Date: 2021-12-02 15:01:19.570598
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '228d82192bf7'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('enterprise',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='企业主键主键'),
sa.Column('company_name', sa.String(length=255), nullable=True, comment='企业名'),
sa.Column('status', sa.String(length=32), nullable=True, comment='经营状态'),
sa.Column('legal', sa.String(length=255), nullable=True, comment='发定代表人'),
sa.Column('capital', sa.String(length=255), nullable=True, comment='注册资本,22万美元'),
sa.Column('capital_nums', sa.Float(), nullable=True, comment='注册资本转换成人民币数值'),
sa.Column('capital_id', sa.Integer(), nullable=True, comment='注册资本大小类型,0-100,1,100-500,2,500-1000,3,1000-5000,4,5000-10000,5,10000+,6'),
sa.Column('build_date', sa.DateTime(), nullable=True, comment='注册时间'),
sa.Column('yearid', sa.Integer(), nullable=True, comment='成立时间年限id(1-3,1)(3-5,2)(5-8,3)(8-10,4)(10-15,5)(15以上,6)'),
sa.Column('province', sa.String(length=32), nullable=True, comment='省'),
sa.Column('city', sa.String(length=32), nullable=True, comment='市'),
sa.Column('district', sa.String(length=32), nullable=True, comment='区'),
sa.Column('lng', sa.String(length=100), nullable=True, comment='经度'),
sa.Column('lat', sa.String(length=100), nullable=True, comment='纬度'),
sa.Column('p_lng', sa.String(length=100), nullable=True, comment='省经度'),
sa.Column('p_lat', sa.String(length=100), nullable=True, comment='省纬度'),
sa.Column('c_lng', sa.String(length=100), nullable=True, comment='市经度'),
sa.Column('c_lat', sa.String(length=100), nullable=True, comment='市纬度'),
sa.Column('d_lng', sa.String(length=100), nullable=True, comment='区经度'),
sa.Column('d_lat', sa.String(length=100), nullable=True, comment='区纬度'),
sa.Column('address', sa.String(length=255), nullable=True, comment='企业地址'),
sa.Column('telephone', sa.Text(), nullable=True, comment='电话'),
sa.Column('telephone_more', sa.Text(), nullable=True, comment='更多电话'),
sa.Column('email', sa.Text(), nullable=True, comment='邮箱'),
sa.Column('social_code', sa.String(length=100), nullable=True, comment='统一社会信用代码'),
sa.Column('tax_code', sa.String(length=100), nullable=True, comment='纳税人识别号'),
sa.Column('register_code', sa.String(length=100), nullable=True, comment='注册号'),
sa.Column('company_code', sa.String(length=100), nullable=True, comment='组织机构代码'),
sa.Column('bao_num', sa.Integer(), nullable=True, comment='参保人数'),
sa.Column('entype', sa.String(length=100), nullable=True, comment='企业类型'),
sa.Column('entypeid', sa.Integer(), nullable=True, comment='公司类型id(个人独资企业-1)(股份有限公司-2)(有限责任公司-3)(合伙企业-4)(集体所有制-5)(全民所有制企业-6)(外商企业-7)'),
sa.Column('company_industry', sa.String(length=100), nullable=True, comment='所属行业'),
sa.Column('web_site', sa.String(length=255), nullable=True, comment='企业网址'),
sa.Column('business_scope', sa.Text(), nullable=True, comment='企业经营范围'),
sa.Column('money_type', sa.String(length=100), nullable=True, comment='注册币种'),
sa.Column('money_type_id', sa.Integer(), nullable=True, comment='注册币种类型id'),
sa.Column('high_new', sa.String(length=32), nullable=True, comment='是否高新技术企业'),
sa.Column('parti_year', sa.Integer(), nullable=True, comment='高新企业注册年份'),
sa.Column('tbe', sa.String(length=32), nullable=True, comment='是否科技型中小企业'),
sa.Column('fianacing', sa.String(length=32), nullable=True, comment='是否为有融资企业'),
sa.Column('fianacing_rounds', sa.String(length=32), nullable=True, comment='融资轮次'),
sa.Column('roundid', sa.Integer(), nullable=True, comment='融资轮次id(天使/种子,1)(PreA/A+,2)(PreB/B+,3)(C轮以上,4)(收并购,5)(战略投资,6)(其他,7)'),
sa.Column('financing_amount', sa.Float(), nullable=True, comment='融资金额'),
sa.Column('software_copyright', sa.String(length=32), nullable=True, comment='是否为有软件著作权'),
sa.Column('num_software', sa.Integer(), nullable=True, comment='软件著作权个数'),
sa.Column('quoted_company', sa.String(length=32), nullable=True, comment='是否上市企业'),
sa.Column('public_sector', sa.String(length=32), nullable=True, comment='上市板块'),
sa.Column('public_id', sa.Integer(), nullable=True, comment='上市版块的id----360企业画像(A股,1)(创业股,2)(港股,3)(新三股,4)(新四股,5)(中小板,6)'),
sa.Column('foreign_investment', sa.String(length=32), nullable=True, comment='是否外商投资'),
sa.Column('patent', sa.String(length=32), nullable=True, comment='是否为有专利企业'),
sa.Column('num_patent', sa.Integer(), nullable=True, comment='专利个数'),
sa.Column('company_info', sa.Text(), nullable=True, comment='公司简介'),
sa.Column('dengl', sa.String(length=32), nullable=True, comment='瞪羚'),
sa.Column('unicorn', sa.String(length=32), nullable=True, comment='独角兽企业'),
sa.Column('isfive', sa.String(length=32), nullable=True, comment='是否中国500强'),
sa.Column('product_all', sa.String(length=255), nullable=True, comment='公司拥有产品'),
sa.Column('takingn', sa.Float(), nullable=True, comment='营收'),
sa.Column('hots', sa.Integer(), nullable=True, comment='企业热度(权重值)'),
sa.Column('c_name', sa.String(length=255), nullable=True, comment='行业类名'),
sa.Column('c_type', sa.Integer(), nullable=True, comment='行业类id'),
sa.Column('f_name', sa.String(length=255), nullable=True, comment='父行业类名'),
sa.Column('f_type', sa.Integer(), nullable=True, comment='父行业类id'),
sa.PrimaryKeyConstraint('id'),
comment='压测资源表'
)
op.create_index(op.f('ix_enterprise_c_type'), 'enterprise', ['c_type'], unique=False)
op.create_index(op.f('ix_enterprise_city'), 'enterprise', ['city'], unique=False)
op.create_index(op.f('ix_enterprise_company_name'), 'enterprise', ['company_name'], unique=False)
op.create_index(op.f('ix_enterprise_district'), 'enterprise', ['district'], unique=False)
op.create_index(op.f('ix_enterprise_entypeid'), 'enterprise', ['entypeid'], unique=False)
op.create_index(op.f('ix_enterprise_f_type'), 'enterprise', ['f_type'], unique=False)
op.create_index(op.f('ix_enterprise_province'), 'enterprise', ['province'], unique=False)
op.create_index(op.f('ix_enterprise_public_id'), 'enterprise', ['public_id'], unique=False)
op.create_index(op.f('ix_enterprise_roundid'), 'enterprise', ['roundid'], unique=False)
op.create_index(op.f('ix_enterprise_yearid'), 'enterprise', ['yearid'], unique=False)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f('ix_enterprise_yearid'), table_name='enterprise')
op.drop_index(op.f('ix_enterprise_roundid'), table_name='enterprise')
op.drop_index(op.f('ix_enterprise_public_id'), table_name='enterprise')
op.drop_index(op.f('ix_enterprise_province'), table_name='enterprise')
op.drop_index(op.f('ix_enterprise_f_type'), table_name='enterprise')
op.drop_index(op.f('ix_enterprise_entypeid'), table_name='enterprise')
op.drop_index(op.f('ix_enterprise_district'), table_name='enterprise')
op.drop_index(op.f('ix_enterprise_company_name'), table_name='enterprise')
op.drop_index(op.f('ix_enterprise_city'), table_name='enterprise')
op.drop_index(op.f('ix_enterprise_c_type'), table_name='enterprise')
op.drop_table('enterprise')
# ### end Alembic commands ###
"""empty message
Revision ID: 25886ec607fa
Revises: 2647b82aeb26
Create Date: 2022-12-03 17:11:46.707769
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '25886ec607fa'
down_revision = '2647b82aeb26'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('industry_collect',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('user_id', sa.Integer(), nullable=True, comment='用户id'),
sa.Column('collect_time', sa.String(length=30), nullable=True, comment='收藏时间'),
sa.Column('industry_name', sa.String(length=30), nullable=True, comment='收藏的产业名称'),
sa.PrimaryKeyConstraint('id'),
comment='招商图谱-产业链收藏'
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('industry_collect')
# ### end Alembic commands ###
"""empty message
Revision ID: 2647b82aeb26
Revises: 657fa1fd4950
Create Date: 2022-12-03 11:40:21.392018
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '2647b82aeb26'
down_revision = '657fa1fd4950'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('bstage',
sa.Column('create_time', sa.DateTime(), nullable=True, comment='创建时间'),
sa.Column('update_time', sa.DateTime(), nullable=True, comment='更新时间'),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('name', sa.String(length=32), nullable=True),
sa.Column('password_hash', sa.String(length=128), nullable=True),
sa.Column('role', sa.Integer(), nullable=True),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('name')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('bstage')
# ### end Alembic commands ###
"""empty message
Revision ID: 281173c29995
Revises: 4c7e28f5420d
Create Date: 2022-03-03 16:25:09.445986
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '281173c29995'
down_revision = '4c7e28f5420d'
branch_labels = None
depends_on = None
def upgrade():
pass
def downgrade():
pass
"""empty message
Revision ID: 2a39eca3d412
Revises: 21bedb912ce7
Create Date: 2022-11-21 18:11:57.240984
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '2a39eca3d412'
down_revision = '21bedb912ce7'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('project_management', sa.Column('project_stalker_explain', sa.String(length=30), nullable=True, comment='项目跟踪说明'))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('project_management', 'project_stalker_explain')
# ### end Alembic commands ###
"""empty message
Revision ID: 2cae5e3d9bd3
Revises: aee7c7c614f7
Create Date: 2023-02-26 10:21:38.459788
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '2cae5e3d9bd3'
down_revision = 'aee7c7c614f7'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index('ix_enterprise_company_id', table_name='enterprise')
op.drop_column('enterprise', 'company_id')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('enterprise', sa.Column('company_id', mysql.INTEGER(display_width=255), autoincrement=False, nullable=True, comment='企业id'))
op.create_index('ix_enterprise_company_id', 'enterprise', ['company_id'], unique=False)
# ### end Alembic commands ###
"""empty message
Revision ID: 2ff5b7509dc4
Revises: 99e2ef03b89c
Create Date: 2022-12-27 11:20:31.050847
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '2ff5b7509dc4'
down_revision = '99e2ef03b89c'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('government',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('pnums', sa.Integer(), nullable=True),
sa.Column('charge', sa.String(length=255), nullable=True),
sa.Column('charge_phone', sa.String(length=255), nullable=True),
sa.Column('function', sa.Text(), nullable=True),
sa.Column('name', sa.String(length=255), nullable=False),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_government_name'), 'government', ['name'], unique=False)
op.create_table('followers',
sa.Column('follower_id', sa.Integer(), nullable=False),
sa.Column('followed_id', sa.Integer(), nullable=False),
sa.ForeignKeyConstraint(['followed_id'], ['government.id'], ),
sa.ForeignKeyConstraint(['follower_id'], ['government.id'], ),
sa.PrimaryKeyConstraint('follower_id', 'followed_id')
)
op.create_table('section',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('pnums', sa.Integer(), nullable=True),
sa.Column('charge', sa.String(length=255), nullable=True),
sa.Column('charge_phone', sa.String(length=255), nullable=True),
sa.Column('function', sa.Text(), nullable=True),
sa.Column('name', sa.String(length=255), nullable=False),
sa.Column('goverment_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['goverment_id'], ['government.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('group',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('pnums', sa.Integer(), nullable=True),
sa.Column('charge', sa.String(length=255), nullable=True),
sa.Column('charge_phone', sa.String(length=255), nullable=True),
sa.Column('function', sa.Text(), nullable=True),
sa.Column('name', sa.String(length=255), nullable=False),
sa.Column('section_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['section_id'], ['section.id'], ),
sa.PrimaryKeyConstraint('id')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('group')
op.drop_table('section')
op.drop_table('followers')
op.drop_index(op.f('ix_government_name'), table_name='government')
op.drop_table('government')
# ### end Alembic commands ###
"""empty message
Revision ID: 3179f93f4bad
Revises: 63cc590aac22
Create Date: 2022-11-24 10:20:55.779959
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '3179f93f4bad'
down_revision = '63cc590aac22'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('project_file', sa.Column('project_id1', sa.Integer(), nullable=True, comment='外键id,项目id'))
op.create_foreign_key(None, 'project_file', 'project_management', ['project_id1'], ['id'])
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint(None, 'project_file', type_='foreignkey')
op.drop_column('project_file', 'project_id1')
# ### end Alembic commands ###
"""empty message
Revision ID: 34fd2628b8f0
Revises: c652571798e5
Create Date: 2023-02-02 11:33:25.066591
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '34fd2628b8f0'
down_revision = 'c652571798e5'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('enterprise', sa.Column('product_all1', sa.String(length=255), nullable=True, comment='公司拥有产品'))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('enterprise', 'product_all1')
# ### end Alembic commands ###
"""empty message
Revision ID: 359190e47912
Revises: 8ba3c2cfae73
Create Date: 2023-02-15 19:27:35.784256
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '359190e47912'
down_revision = '8ba3c2cfae73'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('district_resource',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='园区主键id'),
sa.Column('district', sa.String(length=255), nullable=True, comment='园区名称'),
sa.Column('domestic_water', sa.Float(), nullable=True, comment='居民生活用水(元 / 立方米)'),
sa.Column('not_Domestic_water', sa.Float(), nullable=True, comment='非居民用水(元 / 立方米)'),
sa.Column('special_water', sa.Float(), nullable=True, comment='特种用水(元 / 立方米)'),
sa.Column('electricity_life', sa.Float(), nullable=True, comment='居民生活电价'),
sa.Column('electricity_commercial', sa.Float(), nullable=True, comment='商业电价'),
sa.Column('electricity_industrial', sa.Float(), nullable=True, comment='工业电价'),
sa.Column('gas_city', sa.Float(), nullable=True, comment='城市居民用气(元 / 立方米)'),
sa.Column('gas_commercial', sa.Float(), nullable=True, comment='工商业用气(元 / 立方米)'),
sa.Column('hot_life', sa.Float(), nullable=True, comment='居民用热(元 / 平方米)'),
sa.Column('not_hot_life', sa.Float(), nullable=True, comment='非居民用热(元 / 平方米)'),
sa.PrimaryKeyConstraint('id'),
comment='产业现状图谱-产业载体园区信息表'
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('district_resource')
# ### end Alembic commands ###
"""empty message
Revision ID: 367cd2f84fd1
Revises: 54d8004c6a64
Create Date: 2023-02-22 14:01:52.952604
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '367cd2f84fd1'
down_revision = '54d8004c6a64'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('carrier_build',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('build_name', sa.String(length=20), nullable=True, comment='楼宇名称'),
sa.Column('audit_status', sa.Integer(), nullable=True, comment='审核状态 0为未审核;1为审核通过;2为提交;3为驳回;4未通过'),
sa.Column('audit_message', sa.String(length=50), nullable=True, comment='审核附言'),
sa.Column('upload_people', sa.String(length=20), nullable=True, comment='数据上传人'),
sa.Column('upload_people_id', sa.String(length=20), nullable=True, comment='数据上传人用户id'),
sa.Column('upload_people_role_id', sa.String(length=20), nullable=True, comment='数据上传人权限id'),
sa.Column('upload_people_belong', sa.String(length=100), nullable=True, comment='数据上传人所属区县、机构、部门'),
sa.Column('fix_time', sa.DateTime(), nullable=True, comment='数据修改时间'),
sa.Column('fix_people', sa.String(length=20), nullable=True, comment='数据修改人'),
sa.Column('lng', sa.String(length=50), nullable=True, comment='经度'),
sa.Column('lat', sa.String(length=50), nullable=True, comment='维度'),
sa.Column('district_name', sa.String(length=50), nullable=True, comment='所属县区'),
sa.Column('development_area', sa.String(length=50), nullable=True, comment='所属开发区'),
sa.Column('buide_type', sa.String(length=20), nullable=True, comment='楼宇类型(商铺/写字楼/其他)'),
sa.Column('level', sa.String(length=255), nullable=True, comment='写字楼等级(甲/乙/其他)'),
sa.Column('detail_address', sa.String(length=20), nullable=True, comment='详细地址(地址需填写准确、详细、精准)'),
sa.Column('construction_time', sa.String(length=20), nullable=True, comment='建成时间(年)'),
sa.Column('cover_land_area', sa.String(length=10), nullable=True, comment='总占地面积(㎡)'),
sa.Column('build_area', sa.String(length=20), nullable=True, comment='总建筑面积(㎡)'),
sa.Column('single_area', sa.String(length=20), nullable=True, comment='单层面积(㎡)'),
sa.Column('empty_area', sa.String(length=20), nullable=True, comment='闲置面积(㎡)'),
sa.Column('layer_num', sa.Integer(), nullable=True, comment='总层数'),
sa.Column('car_space_num', sa.Integer(), nullable=True, comment='车位(个)'),
sa.Column('lift_num', sa.Integer(), nullable=True, comment='电梯(部)'),
sa.Column('is_water', sa.String(length=20), nullable=True, comment='是否已通水(是/否)'),
sa.Column('is_electric', sa.String(length=20), nullable=True, comment='是否已通电(是/否)'),
sa.Column('is_warm', sa.String(length=20), nullable=True, comment='是否已通暖(是/否)'),
sa.Column('is_gas', sa.String(length=20), nullable=True, comment='是否已通燃气(是/否)'),
sa.Column('is_internet', sa.String(length=20), nullable=True, comment='是否已通网络(是/否)'),
sa.Column('is_divide', sa.String(length=20), nullable=True, comment='是否可以分割(是/否)'),
sa.Column('attract_status', sa.String(length=20), nullable=True, comment='拟招引产业'),
sa.Column('cooperation_model', sa.String(length=20), nullable=True, comment='合作模式(出租/出售/转让)'),
sa.Column('rent_money', sa.String(length=20), nullable=True, comment='租金(元/平米/天)'),
sa.Column('wuye_money', sa.String(length=20), nullable=True, comment='物业费(元/平米/月)'),
sa.Column('linkman', sa.String(length=20), nullable=True, comment='联系人'),
sa.Column('link_mobile', sa.String(length=20), nullable=True, comment='联系方式'),
sa.Column('build_pic', sa.String(length=20), nullable=True, comment='楼宇图片'),
sa.PrimaryKeyConstraint('id'),
comment='产业载体-楼宇数据表'
)
op.create_table('carrier_factory',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('factory_name', sa.String(length=20), nullable=True, comment='厂房名称'),
sa.Column('lng', sa.String(length=50), nullable=True, comment='经度'),
sa.Column('lat', sa.String(length=50), nullable=True, comment='维度'),
sa.Column('district_name', sa.String(length=50), nullable=True, comment='所属县区'),
sa.Column('development_area', sa.String(length=50), nullable=True, comment='所属开发区'),
sa.Column('build_type', sa.String(length=20), nullable=True, comment='厂房类型(单层/多层/混合层)'),
sa.Column('is_standard', sa.String(length=20), nullable=True, comment='是否标准化厂房(是/否)'),
sa.Column('detail_address', sa.String(length=50), nullable=True, comment='详细地址(地址需填写准确、详细、精准)'),
sa.Column('construction_time', sa.String(length=20), nullable=True, comment='建成时间(年)'),
sa.Column('cover_land_area', sa.String(length=20), nullable=True, comment='总占地面积(㎡)'),
sa.Column('factory_area', sa.String(length=255), nullable=True, comment='总建筑面积(㎡)'),
sa.Column('empty_area', sa.String(length=20), nullable=True, comment='闲置面积(㎡)'),
sa.Column('layer_num', sa.String(length=20), nullable=True, comment='总层数'),
sa.Column('factory_structure', sa.String(length=20), nullable=True, comment='建筑结构(混凝土框架、钢结构、砖混、砖混钢筋、钢筋混凝土、轻钢)'),
sa.Column('width', sa.String(length=10), nullable=True, comment='跨度(m)'),
sa.Column('high', sa.String(length=20), nullable=True, comment='层高(m)'),
sa.Column('bearing', sa.String(length=20), nullable=True, comment='承重(kg/㎡)'),
sa.Column('is_water', sa.String(length=20), nullable=True, comment='是否已通水(是/否)'),
sa.Column('is_electric', sa.String(length=20), nullable=True, comment='是否已通电(是/否)'),
sa.Column('is_warm', sa.String(length=20), nullable=True, comment='是否已通暖(是/否)'),
sa.Column('is_gas', sa.String(length=20), nullable=True, comment='是否已通燃气(是/否)'),
sa.Column('is_network', sa.String(length=20), nullable=True, comment='是否已通网络(是/否)'),
sa.Column('is_car', sa.String(length=20), nullable=True, comment='是否可安装天车'),
sa.Column('lift_num', sa.String(length=20), nullable=True, comment='电梯(部)'),
sa.Column('attract_status', sa.String(length=20), nullable=True, comment='拟招引产业(下拉筛选)'),
sa.Column('settled_enterprise', sa.String(length=20), nullable=True, comment='已入驻企业(企业全称,使用面积)'),
sa.Column('cooperation_model', sa.String(length=20), nullable=True, comment='合作模式(出租/出售/转让)'),
sa.Column('rent_money', sa.String(length=20), nullable=True, comment='租金(元/平米/天)'),
sa.Column('linkman', sa.String(length=20), nullable=True, comment='联系人'),
sa.Column('link_mobile', sa.String(length=20), nullable=True, comment='联系方式'),
sa.Column('price_url', sa.String(length=255), nullable=True, comment='厂房图片url'),
sa.Column('upload_time', sa.DateTime(), nullable=True, comment='数据上传时间'),
sa.Column('upload_people', sa.String(length=20), nullable=True, comment='数据上传人名字'),
sa.Column('upload_people_id', sa.String(length=20), nullable=True, comment='数据上传人用户id'),
sa.Column('upload_people_role_id', sa.String(length=20), nullable=True, comment='数据上传人权限id'),
sa.Column('upload_people_belong', sa.String(length=100), nullable=True, comment='数据上传人所属区县、机构、部门'),
sa.Column('fix_time', sa.DateTime(), nullable=True, comment='数据修改时间'),
sa.Column('fix_people', sa.String(length=20), nullable=True, comment='数据修改人名字'),
sa.Column('audit_status', sa.String(length=20), nullable=True, comment='审核状态 0为未审核;1为审核通过;2为提交;3为驳回;4未通过;'),
sa.Column('audit_message', sa.String(length=50), nullable=True, comment='审核附言'),
sa.PrimaryKeyConstraint('id'),
comment='产业载体-厂房数据表'
)
op.create_table('carrier_land',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('land_name', sa.String(length=20), nullable=True, comment='土地名称'),
sa.Column('upload_time', sa.DateTime(), nullable=True, comment='数据上传时间'),
sa.Column('upload_people', sa.String(length=20), nullable=True, comment='数据上传人名字'),
sa.Column('upload_people_id', sa.String(length=20), nullable=True, comment='数据上传人用户id'),
sa.Column('upload_people_role_id', sa.String(length=20), nullable=True, comment='数据上传人权限id'),
sa.Column('upload_people_belong', sa.String(length=100), nullable=True, comment='数据上传人所属区县、机构、部门'),
sa.Column('fix_time', sa.DateTime(), nullable=True, comment='数据修改时间'),
sa.Column('fix_people', sa.String(length=20), nullable=True, comment='数据修改人名字'),
sa.Column('audit_status', sa.Integer(), nullable=True, comment='审核状态 0为未审核;1为审核通过;2为提交;3为驳回;4未通过'),
sa.Column('audit_message', sa.String(length=50), nullable=True, comment='审核附言'),
sa.Column('lng', sa.String(length=50), nullable=True, comment='经度'),
sa.Column('lat', sa.String(length=50), nullable=True, comment='维度'),
sa.Column('land_code', sa.String(length=20), nullable=True, comment='土地编码'),
sa.Column('district_name', sa.String(length=50), nullable=True, comment='所属县区'),
sa.Column('development_area', sa.String(length=20), nullable=True, comment='所属开发区'),
sa.Column('location', sa.String(length=50), nullable=True, comment='土地位置'),
sa.Column('land_use', sa.String(length=255), nullable=True, comment='用地四至'),
sa.Column('land_nature', sa.String(length=20), nullable=True, comment='用地性质(工业用地/商服用地/物流仓储用地/科研用地/居住用地)(包括用地性质类别代码)'),
sa.Column('total_area', sa.String(length=255), nullable=True, comment='用地面积(净用地面积)(公顷)'),
sa.Column('surface_area', sa.String(length=20), nullable=True, comment='地上控制建面(㎡)'),
sa.Column('plot_ratio', sa.String(length=10), nullable=True, comment='容积率'),
sa.Column('greening_rate', sa.String(length=20), nullable=True, comment='绿化率'),
sa.Column('density', sa.String(length=20), nullable=True, comment='建筑密度'),
sa.Column('height_permitted', sa.String(length=20), nullable=True, comment='限高(㎡)'),
sa.Column('transfer_year', sa.String(length=20), nullable=True, comment='出让年限'),
sa.Column('develop_degree', sa.String(length=20), nullable=True, comment='用地开发程度(请详细描述几通一平)'),
sa.Column('investment_intensity', sa.String(length=20), nullable=True, comment='投资强度(万元/亩)'),
sa.Column('output_intensity', sa.String(length=20), nullable=True, comment='产出强度(万元/亩)'),
sa.Column('tax', sa.String(length=20), nullable=True, comment='地均税收(万元/亩)'),
sa.Column('linkman', sa.String(length=20), nullable=True, comment='联系人'),
sa.Column('telephone', sa.String(length=20), nullable=True, comment='联系方式'),
sa.Column('red_line_map', sa.String(length=20), nullable=True, comment='用地红线图'),
sa.Column('other_requirements', sa.String(length=20), nullable=True, comment='其他要求'),
sa.PrimaryKeyConstraint('id'),
comment='产业载体-土地数据表'
)
op.drop_table('zaiti_factory')
op.drop_table('zaiti_build')
op.drop_table('zaiti_land')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('zaiti_land',
sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False),
sa.Column('telephone', mysql.VARCHAR(length=20), nullable=True, comment='联系方式'),
sa.Column('development_area', mysql.VARCHAR(length=20), nullable=True, comment='所属开发区'),
sa.Column('location', mysql.VARCHAR(length=50), nullable=True, comment='土地位置'),
sa.Column('land_use', mysql.VARCHAR(length=255), nullable=True, comment='用地四至'),
sa.Column('surface_area', mysql.VARCHAR(length=20), nullable=True, comment='地上控制建面(㎡)'),
sa.Column('plot_ratio', mysql.VARCHAR(length=10), nullable=True, comment='容积率'),
sa.Column('greening_rate', mysql.VARCHAR(length=20), nullable=True, comment='绿化率'),
sa.Column('density', mysql.VARCHAR(length=20), nullable=True, comment='建筑密度'),
sa.Column('height_permitted', mysql.VARCHAR(length=20), nullable=True, comment='限高(㎡)'),
sa.Column('transfer_year', mysql.VARCHAR(length=20), nullable=True, comment='出让年限'),
sa.Column('develop_degree', mysql.VARCHAR(length=20), nullable=True, comment='用地开发程度(请详细描述几通一平)'),
sa.Column('investment_intensity', mysql.VARCHAR(length=20), nullable=True, comment='投资强度(万元/亩)'),
sa.Column('output_intensity', mysql.VARCHAR(length=20), nullable=True, comment='产出强度(万元/亩)'),
sa.Column('tax', mysql.VARCHAR(length=20), nullable=True, comment='地均税收(万元/亩)'),
sa.Column('linkman', mysql.VARCHAR(length=20), nullable=True, comment='联系人'),
sa.Column('red_line_map', mysql.VARCHAR(length=20), nullable=True, comment='用地红线图'),
sa.Column('other_requirements', mysql.VARCHAR(length=20), nullable=True, comment='其他要求'),
sa.Column('lng', mysql.VARCHAR(length=50), nullable=True, comment='经度'),
sa.Column('lat', mysql.VARCHAR(length=50), nullable=True, comment='维度'),
sa.Column('land_name', mysql.VARCHAR(length=20), nullable=True, comment='土地名称'),
sa.Column('upload_time', mysql.DATETIME(), nullable=True, comment='数据上传时间'),
sa.Column('upload_people', mysql.VARCHAR(length=20), nullable=True, comment='数据上传人名字'),
sa.Column('upload_people_id', mysql.VARCHAR(length=20), nullable=True, comment='数据上传人用户id'),
sa.Column('upload_people_role_id', mysql.VARCHAR(length=20), nullable=True, comment='数据上传人权限id'),
sa.Column('upload_people_belong', mysql.VARCHAR(length=100), nullable=True, comment='数据上传人所属区县、机构、部门'),
sa.Column('fix_time', mysql.DATETIME(), nullable=True, comment='数据修改时间'),
sa.Column('fix_people', mysql.VARCHAR(length=20), nullable=True, comment='数据修改人名字'),
sa.Column('audit_status', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='审核状态 0为未审核;1为审核通过;2为提交;3为驳回;4未通过'),
sa.Column('audit_message', mysql.VARCHAR(length=50), nullable=True, comment='审核附言'),
sa.Column('land_code', mysql.VARCHAR(length=20), nullable=True, comment='土地编码'),
sa.Column('district_name', mysql.VARCHAR(length=50), nullable=True, comment='所属县区'),
sa.Column('land_nature', mysql.VARCHAR(length=20), nullable=True, comment='用地性质(工业用地/商服用地/物流仓储用地/科研用地/居住用地)(包括用地性质类别代码)'),
sa.Column('total_area', mysql.VARCHAR(length=255), nullable=True, comment='用地面积(净用地面积)(公顷)'),
sa.PrimaryKeyConstraint('id'),
comment='产业载体-土地数据表',
mysql_comment='产业载体-土地数据表',
mysql_default_charset='utf8',
mysql_engine='InnoDB'
)
op.create_table('zaiti_build',
sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False),
sa.Column('buide_type', mysql.VARCHAR(length=20), nullable=True, comment='楼宇类型(商铺/写字楼/其他)'),
sa.Column('development_area', mysql.VARCHAR(length=50), nullable=True, comment='所属开发区'),
sa.Column('level', mysql.VARCHAR(length=255), nullable=True, comment='写字楼等级(甲/乙/其他)'),
sa.Column('build_area', mysql.VARCHAR(length=20), nullable=True, comment='总建筑面积(㎡)'),
sa.Column('single_area', mysql.VARCHAR(length=20), nullable=True, comment='单层面积(㎡)'),
sa.Column('empty_area', mysql.VARCHAR(length=20), nullable=True, comment='闲置面积(㎡)'),
sa.Column('layer_num', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='总层数'),
sa.Column('is_water', mysql.VARCHAR(length=20), nullable=True, comment='是否已通水(是/否)'),
sa.Column('is_electric', mysql.VARCHAR(length=20), nullable=True, comment='是否已通电(是/否)'),
sa.Column('is_warm', mysql.VARCHAR(length=20), nullable=True, comment='是否已通暖(是/否)'),
sa.Column('is_gas', mysql.VARCHAR(length=20), nullable=True, comment='是否已通燃气(是/否)'),
sa.Column('is_internet', mysql.VARCHAR(length=20), nullable=True, comment='是否已通网络(是/否)'),
sa.Column('is_divide', mysql.VARCHAR(length=20), nullable=True, comment='是否可以分割(是/否)'),
sa.Column('cooperation_model', mysql.VARCHAR(length=20), nullable=True, comment='合作模式(出租/出售/转让)'),
sa.Column('linkman', mysql.VARCHAR(length=20), nullable=True, comment='联系人'),
sa.Column('build_pic', mysql.VARCHAR(length=20), nullable=True, comment='楼宇图片'),
sa.Column('lng', mysql.VARCHAR(length=50), nullable=True, comment='经度'),
sa.Column('lat', mysql.VARCHAR(length=50), nullable=True, comment='维度'),
sa.Column('build_name', mysql.VARCHAR(length=20), nullable=True, comment='楼宇名称'),
sa.Column('audit_status', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='审核状态 0为未审核;1为审核通过;2为提交;3为驳回;4未通过'),
sa.Column('audit_message', mysql.VARCHAR(length=50), nullable=True, comment='审核附言'),
sa.Column('upload_people', mysql.VARCHAR(length=20), nullable=True, comment='数据上传人'),
sa.Column('upload_people_id', mysql.VARCHAR(length=20), nullable=True, comment='数据上传人用户id'),
sa.Column('upload_people_role_id', mysql.VARCHAR(length=20), nullable=True, comment='数据上传人权限id'),
sa.Column('upload_people_belong', mysql.VARCHAR(length=100), nullable=True, comment='数据上传人所属区县、机构、部门'),
sa.Column('fix_time', mysql.DATETIME(), nullable=True, comment='数据修改时间'),
sa.Column('fix_people', mysql.VARCHAR(length=20), nullable=True, comment='数据修改人'),
sa.Column('district_name', mysql.VARCHAR(length=50), nullable=True, comment='所属县区'),
sa.Column('detail_address', mysql.VARCHAR(length=20), nullable=True, comment='详细地址(地址需填写准确、详细、精准)'),
sa.Column('construction_time', mysql.VARCHAR(length=20), nullable=True, comment='建成时间(年)'),
sa.Column('cover_land_area', mysql.VARCHAR(length=10), nullable=True, comment='总占地面积(㎡)'),
sa.Column('car_space_num', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='车位(个)'),
sa.Column('lift_num', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='电梯(部)'),
sa.Column('attract_status', mysql.VARCHAR(length=20), nullable=True, comment='拟招引产业'),
sa.Column('rent_money', mysql.VARCHAR(length=20), nullable=True, comment='租金(元/平米/天)'),
sa.Column('wuye_money', mysql.VARCHAR(length=20), nullable=True, comment='物业费(元/平米/月)'),
sa.Column('link_mobile', mysql.VARCHAR(length=20), nullable=True, comment='联系方式'),
sa.PrimaryKeyConstraint('id'),
comment='产业载体-楼宇数据表',
mysql_comment='产业载体-楼宇数据表',
mysql_default_charset='utf8',
mysql_engine='InnoDB'
)
op.create_table('zaiti_factory',
sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False),
sa.Column('bearing', mysql.VARCHAR(length=50), nullable=True, comment='承重(kg/㎡)'),
sa.Column('development_area', mysql.VARCHAR(length=50), nullable=True, comment='所属开发区'),
sa.Column('is_standard', mysql.VARCHAR(length=20), nullable=True, comment='是否标准化厂房(是/否)'),
sa.Column('empty_area', mysql.VARCHAR(length=20), nullable=True, comment='闲置面积(㎡)'),
sa.Column('layer_num', mysql.VARCHAR(length=20), nullable=True, comment='总层数'),
sa.Column('factory_structure', mysql.VARCHAR(length=20), nullable=True, comment='建筑结构(混凝土框架、钢结构、砖混、砖混钢筋、钢筋混凝土、轻钢)'),
sa.Column('width', mysql.VARCHAR(length=10), nullable=True, comment='跨度(m)'),
sa.Column('high', mysql.VARCHAR(length=20), nullable=True, comment='层高(m)'),
sa.Column('is_water', mysql.VARCHAR(length=20), nullable=True, comment='是否已通水(是/否)'),
sa.Column('is_electric', mysql.VARCHAR(length=20), nullable=True, comment='是否已通电(是/否)'),
sa.Column('is_warm', mysql.VARCHAR(length=20), nullable=True, comment='是否已通暖(是/否)'),
sa.Column('is_gas', mysql.VARCHAR(length=20), nullable=True, comment='是否已通燃气(是/否)'),
sa.Column('is_car', mysql.VARCHAR(length=20), nullable=True, comment='是否可安装天车'),
sa.Column('settled_enterprise', mysql.VARCHAR(length=20), nullable=True, comment='已入驻企业(企业全称,使用面积)'),
sa.Column('cooperation_model', mysql.VARCHAR(length=20), nullable=True, comment='合作模式(出租/出售/转让)'),
sa.Column('linkman', mysql.VARCHAR(length=20), nullable=True, comment='联系人'),
sa.Column('lng', mysql.VARCHAR(length=50), nullable=True, comment='经度'),
sa.Column('lat', mysql.VARCHAR(length=50), nullable=True, comment='维度'),
sa.Column('factory_name', mysql.VARCHAR(length=20), nullable=True, comment='厂房名称'),
sa.Column('district_name', mysql.VARCHAR(length=50), nullable=True, comment='所属县区'),
sa.Column('build_type', mysql.VARCHAR(length=20), nullable=True, comment='厂房类型(单层/多层/混合层)'),
sa.Column('detail_address', mysql.VARCHAR(length=50), nullable=True, comment='详细地址(地址需填写准确、详细、精准)'),
sa.Column('construction_time', mysql.VARCHAR(length=20), nullable=True, comment='建成时间(年)'),
sa.Column('cover_land_area', mysql.VARCHAR(length=20), nullable=True, comment='总占地面积(㎡)'),
sa.Column('factory_area', mysql.VARCHAR(length=255), nullable=True, comment='总建筑面积(㎡)'),
sa.Column('is_network', mysql.VARCHAR(length=20), nullable=True, comment='是否已通网络(是/否)'),
sa.Column('lift_num', mysql.VARCHAR(length=20), nullable=True, comment='电梯(部)'),
sa.Column('attract_status', mysql.VARCHAR(length=20), nullable=True, comment='拟招引产业(下拉筛选)'),
sa.Column('rent_money', mysql.VARCHAR(length=20), nullable=True, comment='租金(元/平米/天)'),
sa.Column('link_mobile', mysql.VARCHAR(length=20), nullable=True, comment='联系方式'),
sa.Column('price_url', mysql.VARCHAR(length=255), nullable=True, comment='厂房图片url'),
sa.Column('upload_time', mysql.DATETIME(), nullable=True, comment='数据上传时间'),
sa.Column('upload_people', mysql.VARCHAR(length=20), nullable=True, comment='数据上传人名字'),
sa.Column('upload_people_id', mysql.VARCHAR(length=20), nullable=True, comment='数据上传人用户id'),
sa.Column('upload_people_role_id', mysql.VARCHAR(length=20), nullable=True, comment='数据上传人权限id'),
sa.Column('upload_people_belong', mysql.VARCHAR(length=100), nullable=True, comment='数据上传人所属区县、机构、部门'),
sa.Column('fix_time', mysql.DATETIME(), nullable=True, comment='数据修改时间'),
sa.Column('fix_people', mysql.VARCHAR(length=20), nullable=True, comment='数据修改人名字'),
sa.Column('audit_status', mysql.VARCHAR(length=20), nullable=True, comment='审核状态 0为未审核;1为审核通过;2为提交;3为驳回;4未通过;'),
sa.Column('audit_message', mysql.VARCHAR(length=50), nullable=True, comment='审核附言'),
sa.PrimaryKeyConstraint('id'),
comment='产业载体-厂房数据表',
mysql_comment='产业载体-厂房数据表',
mysql_default_charset='utf8',
mysql_engine='InnoDB'
)
op.drop_table('carrier_land')
op.drop_table('carrier_factory')
op.drop_table('carrier_build')
# ### end Alembic commands ###
"""empty message
Revision ID: 3913b03bf96a
Revises: 2cae5e3d9bd3
Create Date: 2023-02-26 10:23:17.432050
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '3913b03bf96a'
down_revision = '2cae5e3d9bd3'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('enterprise', sa.Column('company_id', sa.String(length=255), nullable=True, comment='企业id'))
op.create_index(op.f('ix_enterprise_company_id'), 'enterprise', ['company_id'], unique=False)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f('ix_enterprise_company_id'), table_name='enterprise')
op.drop_column('enterprise', 'company_id')
# ### end Alembic commands ###
"""create table
Revision ID: 39f0cd363bb8
Revises: 1892550a14e5
Create Date: 2021-12-02 15:35:48.143685
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '39f0cd363bb8'
down_revision = '1892550a14e5'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('city',
sa.Column('create_time', sa.DateTime(), nullable=True),
sa.Column('update_time', sa.DateTime(), nullable=True),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='经济指标主键id'),
sa.Column('area', sa.String(length=255), nullable=True, comment='区县名称'),
sa.Column('size', sa.Float(), nullable=True, comment='区县面积'),
sa.Column('year', sa.Integer(), nullable=True, comment='年份'),
sa.Column('people', sa.Integer(), nullable=True, comment='人口'),
sa.Column('GDP', sa.Float(), nullable=True, comment='GDP(万元)'),
sa.Column('investment', sa.Float(), nullable=True, comment='固定投资资产'),
sa.Column('retail', sa.Float(), nullable=True, comment='社会消费品零售总额'),
sa.Column('public', sa.Float(), nullable=True, comment='一般公共预算支出'),
sa.Column('public_in', sa.Float(), nullable=True, comment='一般公共预算收入'),
sa.Column('addscale', sa.Float(), nullable=True, comment='规上工业增加值'),
sa.Column('people_out', sa.Float(), nullable=True, comment='居然人均可支配收入'),
sa.Column('people_per', sa.Float(), nullable=True, comment='居民消费价格指数'),
sa.Column('in_out', sa.Float(), nullable=True, comment='进出口总额'),
sa.Column('info', sa.Text(), nullable=True, comment='基本信息'),
sa.Column('question', sa.Text(), nullable=True, comment='标注'),
sa.PrimaryKeyConstraint('id'),
comment='招商驾驶舱-区县经济指标表'
)
op.create_table('company',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='企业主键id'),
sa.Column('company_name', sa.String(length=255), nullable=True, comment='企业名'),
sa.Column('status', sa.String(length=32), nullable=True, comment='经营状态'),
sa.Column('legal', sa.String(length=32), nullable=True, comment='法定代表人'),
sa.Column('capital', sa.String(length=255), nullable=True, comment='注册资本,22万美元'),
sa.Column('capital_nums', sa.Float(), nullable=True, comment='注册资本转换成人民币数值'),
sa.Column('capital_id', sa.Integer(), nullable=True, comment='注册资本大小类型,0-100,1,100-500,2,500-1000,3,1000-5000,4,5000-10000,5,10000+,6'),
sa.Column('build_date', sa.DateTime(), nullable=True, comment='注册时间'),
sa.Column('yearid', sa.Integer(), nullable=True, comment='成立时间年限id(1-3,1)(3-5,2)(5-8,3)(8-10,4)(10-15,5)(15以上,6)'),
sa.Column('province', sa.String(length=32), nullable=True, comment='省'),
sa.Column('city', sa.String(length=32), nullable=True, comment='市'),
sa.Column('district', sa.String(length=32), nullable=True, comment='区'),
sa.Column('lng', sa.String(length=100), nullable=True, comment='经度'),
sa.Column('lat', sa.String(length=100), nullable=True, comment='纬度'),
sa.Column('c_lng', sa.String(length=100), nullable=True, comment='市经度'),
sa.Column('c_lat', sa.String(length=100), nullable=True, comment='市纬度'),
sa.Column('d_lng', sa.String(length=100), nullable=True, comment='区经度'),
sa.Column('d_lat', sa.String(length=100), nullable=True, comment='区纬度'),
sa.Column('address', sa.String(length=255), nullable=True, comment='企业地址'),
sa.Column('telephone', sa.Text(), nullable=True, comment='电话'),
sa.Column('telephone_more', sa.Text(), nullable=True, comment='更多电话'),
sa.Column('email', sa.Text(), nullable=True, comment='邮箱'),
sa.Column('social_code', sa.String(length=100), nullable=True, comment='统一社会信用代码'),
sa.Column('tax_code', sa.String(length=100), nullable=True, comment='纳税人识别号'),
sa.Column('register_code', sa.String(length=100), nullable=True, comment='注册号'),
sa.Column('company_code', sa.String(length=100), nullable=True, comment='组织机构代码'),
sa.Column('bao_num', sa.Integer(), nullable=True, comment='参保人数'),
sa.Column('entype', sa.String(length=100), nullable=True, comment='企业类型'),
sa.Column('entypeid', sa.Integer(), nullable=True, comment='公司类型id(个人独资企业-1)(股份有限公司-2)(有限责任公司-3)(合伙企业-4)(集体所有制-5)(全民所有制企业-6)(外商企业-7)'),
sa.Column('company_industry', sa.String(length=100), nullable=True, comment='所属行业'),
sa.Column('web_site', sa.String(length=255), nullable=True, comment='企业网址'),
sa.Column('business_scope', sa.Text(), nullable=True, comment='企业经营范围'),
sa.Column('money_type', sa.String(length=100), nullable=True, comment='注册币种'),
sa.Column('money_type_id', sa.Integer(), nullable=True, comment='注册币种类型id'),
sa.Column('high_new', sa.String(length=32), nullable=True, comment='是否高新技术企业'),
sa.Column('parti_year', sa.Integer(), nullable=True, comment='高新企业注册年份'),
sa.Column('tbe', sa.String(length=32), nullable=True, comment='是否科技型中小企业'),
sa.Column('fianacing', sa.String(length=32), nullable=True, comment='是否为有融资企业'),
sa.Column('fianacing_rounds', sa.String(length=32), nullable=True, comment='融资轮次'),
sa.Column('roundid', sa.Integer(), nullable=True, comment='融资轮次id(天使/种子,1)(PreA/A+,2)(PreB/B+,3)(C轮以上,4)(收并购,5)(战略投资,6)(其他,7)'),
sa.Column('financing_amount', sa.Float(), nullable=True, comment='融资金额'),
sa.Column('software_copyright', sa.String(length=32), nullable=True, comment='是否为有软件著作权'),
sa.Column('num_software', sa.Integer(), nullable=True, comment='软件著作权个数'),
sa.Column('public_sector', sa.String(length=32), nullable=True, comment='上市板块'),
sa.Column('quoted_company', sa.String(length=32), nullable=True, comment='是否上市企业'),
sa.Column('public_id', sa.Integer(), nullable=True, comment='上市版块的id----360企业画像(A股,1)(创业股,2)(港股,3)(新三股,4)(新四股,5)(中小板,6)'),
sa.Column('foreign_investment', sa.String(length=32), nullable=True, comment='是否外商投资'),
sa.Column('patent', sa.String(length=32), nullable=True, comment='是否为有专利企业'),
sa.Column('num_patent', sa.Integer(), nullable=True, comment='专利个数'),
sa.Column('induzone', sa.String(length=255), nullable=True, comment='所在园区'),
sa.Column('company_info', sa.Text(), nullable=True, comment='公司简介'),
sa.Column('sxmon', sa.String(length=32), nullable=True, comment='是否山西民营100强(2019年)'),
sa.Column('zjtg', sa.String(length=32), nullable=True, comment='山西专精特工企业'),
sa.Column('unicorn', sa.String(length=32), nullable=True, comment='独角兽企业'),
sa.Column('dengl', sa.String(length=32), nullable=True, comment='瞪羚'),
sa.Column('hncode', sa.String(length=32), nullable=True, comment='高企证书编号'),
sa.Column('isfive', sa.String(length=32), nullable=True, comment='是否中国500强'),
sa.Column('istyfive', sa.String(length=32), nullable=True, comment='是否2020中国500强'),
sa.Column('quotedate', sa.DateTime(), nullable=True, comment='上市时间'),
sa.Column('sxonhun', sa.String(length=32), nullable=True, comment='是否山西100强'),
sa.Column('product_all', sa.String(length=255), nullable=True, comment='公司拥有产品'),
sa.Column('scale', sa.String(length=32), nullable=True, comment='规模以上企业'),
sa.Column('serve', sa.String(length=32), nullable=True, comment='限额以上服务业'),
sa.Column('takingn', sa.Float(), nullable=True, comment='2019营收 (万元)'),
sa.Column('ouputn', sa.Float(), nullable=True, comment='2019年产值'),
sa.Column('profit', sa.Float(), nullable=True, comment='2019公司利润(万元)'),
sa.Column('c_name', sa.String(length=255), nullable=True, comment='行业类名'),
sa.Column('c_type', sa.Integer(), nullable=True, comment='行业类id'),
sa.Column('f_name', sa.String(length=255), nullable=True, comment='父行业类名'),
sa.Column('f_type', sa.Integer(), nullable=True, comment='父行业类id'),
sa.Column('hots', sa.Integer(), nullable=True, comment='企业热度'),
sa.Column('sort_num', sa.Integer(), nullable=True, comment='权重值'),
sa.Column('stream', sa.String(length=32), nullable=True, comment='行业上下游'),
sa.Column('product', sa.String(length=255), nullable=True, comment='生产产品'),
sa.PrimaryKeyConstraint('id'),
comment='晋城企业表'
)
op.create_table('examine',
sa.Column('create_time', sa.DateTime(), nullable=True),
sa.Column('update_time', sa.DateTime(), nullable=True),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('district', sa.String(length=255), nullable=True, comment='县区'),
sa.Column('year', sa.Integer(), nullable=True, comment='年'),
sa.Column('month', sa.Integer(), nullable=True, comment='月'),
sa.Column('project_num', sa.Integer(), nullable=True, comment='项目个数'),
sa.Column('sign_aim', sa.Integer(), nullable=True, comment='签约目标'),
sa.Column('sign_finnish', sa.Float(), nullable=True, comment='签约的完成'),
sa.Column('sign_grade', sa.Float(), nullable=True, comment='签约的得分,签约项目投资额完成率'),
sa.Column('start_finish', sa.Float(), nullable=True, comment='开工实际投资'),
sa.Column('start_grade', sa.Float(), nullable=True, comment='开工项目完成得分,开工项目计划投资额完成率'),
sa.Column('invest_finish', sa.Float(), nullable=True, comment='固投已完成'),
sa.Column('invest_grade', sa.Float(), nullable=True, comment='固投得分,开工项目到位资金额'),
sa.Column('start_num', sa.Integer(), nullable=True, comment='项目的开工个数'),
sa.Column('start_num_grade', sa.Float(), nullable=True, comment='签约开工率得分'),
sa.Column('start_aim', sa.Float(), nullable=True, comment='开工计划金额'),
sa.Column('invest_aim', sa.Float(), nullable=True, comment='固投目标金额'),
sa.Column('invest_aim_f', sa.Float(), nullable=True, comment='非固投目标金额'),
sa.Column('invest_finish_f', sa.Integer(), nullable=True, comment='非固投已完成'),
sa.Column('invest_grade_f', sa.Float(), nullable=True, comment='非固投得分'),
sa.Column('grade', sa.Integer(), nullable=True, comment='综合排名'),
sa.PrimaryKeyConstraint('id'),
comment='招商驾驶舱-招商引资作战图表'
)
op.create_table('indu_policy',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='政策主键id'),
sa.Column('name', sa.String(length=255), nullable=True, comment='政策名'),
sa.Column('post_num', sa.String(length=255), nullable=True, comment='发文字号'),
sa.Column('industry', sa.String(length=32), nullable=True, comment='行业名称'),
sa.Column('pubdate', sa.DateTime(), nullable=True, comment='发布时间'),
sa.Column('year', sa.Integer(), nullable=True, comment='发布年份'),
sa.Column('url', sa.String(length=255), nullable=True, comment='外链接'),
sa.Column('file', sa.String(length=255), nullable=True, comment='本地文件位置'),
sa.Column('category', sa.String(length=32), nullable=True, comment='政策类型'),
sa.Column('org', sa.String(length=255), nullable=True, comment='政策发布机构'),
sa.Column('district', sa.String(length=32), nullable=True, comment='政策发布地区'),
sa.Column('body', sa.Text(), nullable=True, comment='正文'),
sa.Column('navigator', sa.String(length=255), nullable=True, comment='导航一'),
sa.Column('navigat', sa.String(length=255), nullable=True, comment='导航二'),
sa.Column('level', sa.String(length=255), nullable=True, comment='级别'),
sa.Column('sorts', sa.Integer(), nullable=True, comment='机构排序'),
sa.Column('sorts_level', sa.Integer(), nullable=True, comment='发布机构排序'),
sa.PrimaryKeyConstraint('id'),
comment='招商驾驶舱-产业政策'
)
op.create_table('industry',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='产业主键id'),
sa.Column('name', sa.String(length=32), nullable=True, comment='导航名'),
sa.Column('oname', sa.String(length=32), nullable=True, comment='导航真名'),
sa.Column('nid', sa.Integer(), nullable=True, comment='导航id(导航在企业数据中的id)'),
sa.Column('fid', sa.Integer(), nullable=True, comment='表中fid'),
sa.Column('statu', sa.Integer(), nullable=True, comment='启用状态1启用,2禁用'),
sa.Column('info', sa.Text(), nullable=True, comment='行业简介'),
sa.Column('companys', sa.Integer(), nullable=True, comment='行业下企业数'),
sa.Column('entities', sa.Integer(), nullable=True, comment='行业所包含细分行业实体数'),
sa.PrimaryKeyConstraint('id'),
comment='产业导航目录表'
)
op.create_table('newproject',
sa.Column('create_time', sa.DateTime(), nullable=True),
sa.Column('update_time', sa.DateTime(), nullable=True),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('type', sa.String(length=255), nullable=True, comment='产业类型'),
sa.Column('number', sa.Integer(), nullable=True, comment='项目个数'),
sa.Column('money', sa.Float(), nullable=True, comment='价格'),
sa.Column('district', sa.String(length=255), nullable=True, comment='区县名称'),
sa.PrimaryKeyConstraint('id'),
comment='招商驾驶舱-项目数量/金额产业分布表'
)
op.create_table('project',
sa.Column('create_time', sa.DateTime(), nullable=True),
sa.Column('update_time', sa.DateTime(), nullable=True),
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='工程id'),
sa.Column('name', sa.String(length=255), nullable=True, comment='工程名'),
sa.Column('district', sa.String(length=255), nullable=True, comment='区县名称'),
sa.Column('type', sa.String(length=255), nullable=True, comment='工程类型'),
sa.Column('money', sa.String(length=255), nullable=True, comment='项目投资金额'),
sa.Column('background', sa.Text(), nullable=True, comment='项目背景'),
sa.Column('content', sa.Text(), nullable=True, comment='项目的具体内容'),
sa.Column('way', sa.Text(), nullable=True, comment='拟引资方式及内容'),
sa.Column('company', sa.String(length=255), nullable=True, comment='招商单位'),
sa.Column('contact', sa.String(length=255), nullable=True, comment='联系方式'),
sa.Column('email', sa.String(length=255), nullable=True, comment='电子邮箱'),
sa.PrimaryKeyConstraint('id'),
comment='招商驾驶舱-重点项目表'
)
op.create_table('video',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='视频主键id'),
sa.Column('district', sa.String(length=32), nullable=False, comment='区县名称'),
sa.Column('video_id', sa.String(length=35), nullable=True, comment='视频'),
sa.PrimaryKeyConstraint('id'),
comment='招商驾驶舱-各区县视频表'
)
op.alter_column('enterprise', 'id',
existing_type=mysql.INTEGER(display_width=11),
comment='企业主键id主键id',
existing_comment='企业主键主键',
existing_nullable=False,
autoincrement=True)
op.create_table_comment(
'enterprise',
'全国企业表',
existing_comment='全国企业',
schema=None
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table_comment(
'enterprise',
'全国企业',
existing_comment='全国企业表',
schema=None
)
op.alter_column('enterprise', 'id',
existing_type=mysql.INTEGER(display_width=11),
comment='企业主键主键',
existing_comment='企业主键id主键id',
existing_nullable=False,
autoincrement=True)
op.drop_table('video')
op.drop_table('project')
op.drop_table('newproject')
op.drop_table('industry')
op.drop_table('indu_policy')
op.drop_table('examine')
op.drop_table('company')
op.drop_table('city')
# ### end Alembic commands ###
"""empty message
Revision ID: 3aae2e3789ac
Revises: 8805cd14ed4c
Create Date: 2023-02-02 17:36:14.981474
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '3aae2e3789ac'
down_revision = '8805cd14ed4c'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('enterprise', sa.Column('industry_chain_id', sa.Integer(), nullable=True))
op.create_foreign_key(None, 'enterprise', 'industry_chain', ['industry_chain_id'], ['id'])
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint(None, 'enterprise', type_='foreignkey')
op.drop_column('enterprise', 'industry_chain_id')
# ### end Alembic commands ###
"""empty message
Revision ID: 3b60b8db0e63
Revises: a2a846da1ccd
Create Date: 2023-02-26 11:16:29.638256
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '3b60b8db0e63'
down_revision = 'a2a846da1ccd'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('customer_consultation', sa.Column('is_sync', sa.Integer(), nullable=True, comment='是否同步到平台 0否1是'))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('customer_consultation', 'is_sync')
# ### end Alembic commands ###
"""empty message
Revision ID: 3bda08bf8007
Revises: 1ba77e435ccc
Create Date: 2022-12-05 10:21:17.552525
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '3bda08bf8007'
down_revision = '1ba77e435ccc'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('carrier_build',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('district_name', sa.String(length=50), nullable=True, comment='区域名称'),
sa.Column('build_name', sa.String(length=50), nullable=True, comment='楼宇名称'),
sa.Column('industry_name', sa.String(length=255), nullable=True, comment='产业名称'),
sa.Column('industry_type', sa.String(length=20), nullable=True, comment='产业类型'),
sa.Column('total_area', sa.String(length=20), nullable=True, comment='总面积(㎡)'),
sa.Column('cover_land_area', sa.String(length=20), nullable=True, comment='占地面积(㎡)'),
sa.Column('build_type', sa.String(length=20), nullable=True, comment='楼宇类型'),
sa.Column('rent_rate', sa.String(length=20), nullable=True, comment='出租率'),
sa.Column('layer_num', sa.Integer(), nullable=True, comment='总层数(层,填写整数)'),
sa.Column('detail_address', sa.String(length=50), nullable=True, comment='详细地址'),
sa.Column('lng', sa.String(length=50), nullable=True, comment='经度'),
sa.Column('lat', sa.String(length=50), nullable=True, comment='维度'),
sa.Column('construction_time', sa.String(length=20), nullable=True, comment='建设时间(例如:2022年)'),
sa.Column('upload_time', sa.DateTime(), nullable=True, comment='数据上传时间'),
sa.Column('upload_people', sa.String(length=20), nullable=True, comment='数据上传人'),
sa.Column('upload_people_id', sa.String(length=20), nullable=True, comment='数据上传人用户id'),
sa.Column('upload_people_role_id', sa.String(length=20), nullable=True, comment='数据上传人权限id'),
sa.Column('upload_people_belong', sa.String(length=100), nullable=True, comment='数据上传人所属区县、机构、部门'),
sa.Column('fix_time', sa.DateTime(), nullable=True, comment='数据修改时间'),
sa.Column('fix_people', sa.String(length=20), nullable=True, comment='数据修改人'),
sa.Column('build_status', sa.String(length=20), nullable=True, comment='楼宇状态'),
sa.Column('rent_money', sa.String(length=20), nullable=True, comment='租金范围(元/平米/天)'),
sa.Column('wuye_money', sa.String(length=20), nullable=True, comment='物业费(元/平米/天)'),
sa.Column('audit_status', sa.Integer(), nullable=True, comment='审核状态 0为未审核;1为审核通过;2为提交;3为驳回;4未通过'),
sa.Column('audit_message', sa.String(length=50), nullable=True, comment='审核附言'),
sa.Column('build_info', sa.String(length=255), nullable=True, comment='楼宇介绍'),
sa.Column('inside_picture_url', sa.String(length=255), nullable=True, comment='内部照片url'),
sa.Column('outer_picture_url', sa.String(length=255), nullable=True, comment='外部照片url'),
sa.Column('price_url', sa.String(length=255), nullable=True, comment='平面图url'),
sa.Column('car_space_num', sa.Integer(), nullable=True, comment='车位数(个,填写整数)'),
sa.Column('lift_num', sa.Integer(), nullable=True, comment='电梯数(部,填写整数)'),
sa.Column('rentout_status', sa.String(length=20), nullable=True, comment='出租状态'),
sa.Column('linkman', sa.String(length=20), nullable=True, comment='联系人'),
sa.Column('link_mobile', sa.String(length=20), nullable=True, comment='联系方式'),
sa.Column('build_area', sa.String(length=20), nullable=True, comment='建筑面积(㎡)'),
sa.Column('empty_area', sa.String(length=20), nullable=True, comment='闲置面积(㎡)'),
sa.Column('build_structure', sa.String(length=20), nullable=True, comment='建筑结构'),
sa.Column('owner', sa.String(length=20), nullable=True, comment='权属人'),
sa.Column('attract_status', sa.String(length=20), nullable=True, comment='拟招引状态'),
sa.Column('attract_industry_status', sa.String(length=20), nullable=True, comment='招引业态'),
sa.Column('cooperation_model', sa.String(length=20), nullable=True, comment='合作模式'),
sa.Column('attract_advantage', sa.String(length=255), nullable=True, comment='招商优势'),
sa.Column('policy', sa.String(length=255), nullable=True, comment='优惠政策'),
sa.PrimaryKeyConstraint('id'),
comment='载体资源库-楼宇详情表'
)
op.create_table('carrier_factory',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('district_name', sa.String(length=50), nullable=True, comment='区域名称'),
sa.Column('factory_name', sa.String(length=50), nullable=True, comment='厂房名称'),
sa.Column('is_standard', sa.String(length=10), nullable=True, comment='是否为标准化厂房(是或否)'),
sa.Column('rent_status', sa.String(length=10), nullable=True, comment='是否对外租赁(是或否)'),
sa.Column('rent_money', sa.String(length=20), nullable=True, comment='租金范围(元/平米/天)'),
sa.Column('detail_address', sa.String(length=20), nullable=True, comment='详细地址'),
sa.Column('factory_area', sa.String(length=20), nullable=True, comment='建筑面积(㎡)'),
sa.Column('cover_land_area', sa.String(length=20), nullable=True, comment='占地面积(㎡)'),
sa.Column('cover_land_area_id', sa.Integer(), nullable=True, comment='占地面积范围id(1:0-500㎡;2:500-1000㎡;3:1000-2000㎡;4:2000-5000㎡;5:5000-10000㎡)'),
sa.Column('industry_name', sa.String(length=255), nullable=True, comment='产业名称'),
sa.Column('property_type', sa.String(length=50), nullable=True, comment='产权类型'),
sa.Column('construction_time', sa.String(length=20), nullable=True, comment='建设时间(例如:2022年)'),
sa.Column('upload_time', sa.DateTime(), nullable=True, comment='数据上传时间'),
sa.Column('upload_people', sa.String(length=20), nullable=True, comment='数据上传人名字'),
sa.Column('upload_people_id', sa.String(length=20), nullable=True, comment='数据上传人用户id'),
sa.Column('upload_people_role_id', sa.String(length=20), nullable=True, comment='数据上传人权限id'),
sa.Column('upload_people_belong', sa.String(length=100), nullable=True, comment='数据上传人所属区县、机构、部门'),
sa.Column('fix_time', sa.DateTime(), nullable=True, comment='数据修改时间'),
sa.Column('fix_people', sa.String(length=20), nullable=True, comment='数据修改人名字'),
sa.Column('factory_status', sa.String(length=50), nullable=True, comment='厂房状态'),
sa.Column('audit_status', sa.String(length=20), nullable=True, comment='审核状态 0为未审核;1为审核通过;2为提交;3为驳回;4未通过;'),
sa.Column('audit_message', sa.String(length=50), nullable=True, comment='审核附言'),
sa.Column('lng', sa.String(length=50), nullable=True, comment='经度'),
sa.Column('lat', sa.String(length=50), nullable=True, comment='维度'),
sa.Column('factory_info', sa.String(length=255), nullable=True, comment='厂房介绍'),
sa.Column('inside_picture_url', sa.String(length=255), nullable=True, comment='内部照片url'),
sa.Column('outer_picture_url', sa.String(length=255), nullable=True, comment='外部照片url'),
sa.Column('price_url', sa.String(length=255), nullable=True, comment='平面图url'),
sa.Column('empty_area', sa.String(length=20), nullable=True, comment='闲置面积(㎡)'),
sa.Column('factory_structure', sa.String(length=20), nullable=True, comment='建筑结构'),
sa.Column('width', sa.String(length=20), nullable=True, comment='跨度(米)'),
sa.Column('high', sa.String(length=20), nullable=True, comment='层高(米)'),
sa.Column('bearing', sa.String(length=20), nullable=True, comment='承重(500kg/m2)'),
sa.Column('linkman', sa.String(length=20), nullable=True, comment='联系人'),
sa.Column('link_mobile', sa.String(length=20), nullable=True, comment='联系方式'),
sa.Column('is_electric', sa.String(length=10), nullable=True, comment='是否已通电(是或否)'),
sa.Column('is_water', sa.String(length=10), nullable=True, comment='是否已通水(是或否)'),
sa.Column('is_warm', sa.String(length=10), nullable=True, comment='是否已通暖(是或否)'),
sa.Column('is_gas', sa.String(length=10), nullable=True, comment='是否已通燃气(是或否)'),
sa.Column('is_network', sa.String(length=10), nullable=True, comment='是否已通网络(是或否)'),
sa.Column('is_lift', sa.String(length=10), nullable=True, comment='是否有电梯(是或否)'),
sa.Column('lift_num', sa.Integer(), nullable=True, comment='电梯数量(部,填写整数)'),
sa.Column('is_car_space', sa.Integer(), nullable=True, comment='是否有车位(是1否0)'),
sa.Column('layer_num', sa.Integer(), nullable=True, comment='总层数(层,填写整数)'),
sa.Column('attract_status', sa.String(length=20), nullable=True, comment='拟招引状态'),
sa.Column('cooperation_model', sa.String(length=20), nullable=True, comment='合作模式'),
sa.Column('attract_advantage', sa.String(length=255), nullable=True, comment='招商优势'),
sa.Column('policy', sa.String(length=255), nullable=True, comment='相关政策'),
sa.PrimaryKeyConstraint('id'),
comment='载体资源库-厂房详情表'
)
op.create_table('carrier_land',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('district_name', sa.String(length=50), nullable=True, comment='区域名称'),
sa.Column('land_name', sa.String(length=50), nullable=True, comment='土地名称'),
sa.Column('industry_name', sa.String(length=255), nullable=True, comment='产业名称'),
sa.Column('land_nature', sa.String(length=20), nullable=True, comment='土地性质)'),
sa.Column('land_nature_id', sa.Integer(), nullable=True, comment='土地性质id(1:农用地;2:商业用地;3:建设用地;4:旅游用地;5:居民用地。)'),
sa.Column('detail_address', sa.String(length=20), nullable=True, comment='详细地址'),
sa.Column('lng', sa.String(length=50), nullable=True, comment='经度'),
sa.Column('lat', sa.String(length=50), nullable=True, comment='维度'),
sa.Column('total_area', sa.String(length=20), nullable=True, comment='总面积(㎡)'),
sa.Column('total_area_id', sa.Integer(), nullable=True, comment='总面积范围id(1:0-500㎡;2:500-1000㎡;3:1000-2000㎡;4:2000-5000㎡;5:5000-10000㎡)'),
sa.Column('industry_type', sa.String(length=20), nullable=True, comment='产业类型'),
sa.Column('jing_area', sa.String(length=20), nullable=True, comment='净面积(㎡)'),
sa.Column('transfer_year', sa.String(length=20), nullable=True, comment='出让年限(年)'),
sa.Column('transfer_year_id', sa.Integer(), nullable=True, comment='出让年限范围id(1:0-5年;2:5-10年;3:10-15年;4:15-20年;5:20年以上)'),
sa.Column('land_code', sa.String(length=50), nullable=True, comment='土地编码'),
sa.Column('upload_time', sa.DateTime(), nullable=True, comment='数据上传时间'),
sa.Column('upload_people', sa.String(length=20), nullable=True, comment='数据上传人名字'),
sa.Column('upload_people_id', sa.String(length=20), nullable=True, comment='数据上传人用户id'),
sa.Column('upload_people_role_id', sa.String(length=20), nullable=True, comment='数据上传人权限id'),
sa.Column('upload_people_belong', sa.String(length=100), nullable=True, comment='数据上传人所属区县、机构、部门'),
sa.Column('fix_time', sa.DateTime(), nullable=True, comment='数据修改时间'),
sa.Column('fix_people', sa.String(length=20), nullable=True, comment='数据修改人名字'),
sa.Column('land_status', sa.Integer(), nullable=True, comment='土地状态 0为闲置;1为占用'),
sa.Column('audit_status', sa.Integer(), nullable=True, comment='审核状态 0为未审核;1为审核通过;2为提交;3为驳回;4未通过'),
sa.Column('audit_message', sa.String(length=50), nullable=True, comment='审核附言'),
sa.Column('linkman', sa.String(length=20), nullable=True, comment='联系人'),
sa.Column('link_mobile', sa.String(length=20), nullable=True, comment='联系方式'),
sa.Column('land_info', sa.String(length=255), nullable=True, comment='土地介绍'),
sa.Column('inside_picture_url', sa.String(length=255), nullable=True, comment='内部照片url'),
sa.Column('outer_picture_url', sa.String(length=255), nullable=True, comment='外部照片url'),
sa.Column('plot_ratio', sa.String(length=20), nullable=True, comment='容积率'),
sa.Column('sales_price', sa.String(length=20), nullable=True, comment='销售均价(毛坯)(万元)'),
sa.Column('max_sales_price', sa.String(length=20), nullable=True, comment='最高销售单价(万元)'),
sa.Column('max_car_space_price', sa.String(length=20), nullable=True, comment='车位最高销售单价'),
sa.Column('plan_target', sa.String(length=20), nullable=True, comment='规划指标'),
sa.Column('plan_condition', sa.String(length=20), nullable=True, comment='规划条件'),
sa.Column('price_url', sa.String(length=255), nullable=True, comment='规划图url'),
sa.Column('surround_facility', sa.String(length=255), nullable=True, comment='周边配套(多个,列表形式,顿号分隔)'),
sa.Column('education_name', sa.String(length=255), nullable=True, comment='教育机构名称(多个,列表形式,顿号分隔)'),
sa.Column('medical_name', sa.String(length=255), nullable=True, comment='医疗设施名称(多个,列表形式,顿号分隔)'),
sa.Column('park_name', sa.String(length=255), nullable=True, comment='大型公园名称(多个,列表形式,顿号分隔)'),
sa.Column('shangfu_center', sa.String(length=255), nullable=True, comment='商服中心(多个,列表形式,顿号分隔)'),
sa.Column('administration_center', sa.String(length=255), nullable=True, comment='行政中心(多个,列表形式,顿号分隔)'),
sa.Column('policy', sa.String(length=255), nullable=True, comment='相关政策(多个,列表形式,顿号分隔)'),
sa.PrimaryKeyConstraint('id'),
comment='载体资源库-土地详情表'
)
op.create_table('operation_log',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('operation_time', sa.DateTime(), nullable=True, comment='操作时间'),
sa.Column('operation_people', sa.String(length=20), nullable=True, comment='操作人名字'),
sa.Column('operation_people_id', sa.String(length=20), nullable=True, comment='操作人id'),
sa.Column('operation_people_belong', sa.String(length=100), nullable=True, comment='操作人所属区县、机构、部门'),
sa.Column('operation_mobile', sa.String(length=20), nullable=True, comment='操作人电话'),
sa.Column('operation_message', sa.String(length=255), nullable=True, comment='操作信息'),
sa.Column('section', sa.String(length=20), nullable=True, comment='操作人职务'),
sa.Column('remark', sa.String(length=20), nullable=True, comment='备注:是或否(是否是每月二十五号前进行提报导入)'),
sa.Column('action', sa.String(length=20), nullable=True, comment='记录"导入"的动作用于备注(每月十五号前是否进行提报导入)的是和否'),
sa.Column('read_type', sa.Integer(), nullable=True, comment='消息类型(用于消息提醒) 0未读,1已读,3已读状态一天后转为历史消息'),
sa.Column('time', sa.DateTime(), nullable=True, comment='转为已读状态的时间(用于消息提醒)'),
sa.PrimaryKeyConstraint('id'),
comment='载体资源库-记录操作日志的数据表'
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('operation_log')
op.drop_table('carrier_land')
op.drop_table('carrier_factory')
op.drop_table('carrier_build')
# ### end Alembic commands ###
"""empty message
Revision ID: 408eefbb94e1
Revises: dae54e2910be
Create Date: 2023-03-07 11:54:53.115716
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '408eefbb94e1'
down_revision = 'dae54e2910be'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('enterprise', sa.Column('chain_master', sa.String(length=20), nullable=True, comment='链主企业'))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('enterprise', 'chain_master')
# ### end Alembic commands ###
"""empty message
Revision ID: 41f4a2368801
Revises: 0440b17fefaa
Create Date: 2022-11-09 16:41:41.057707
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '41f4a2368801'
down_revision = '0440b17fefaa'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('siku_project',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('distribute_condition', sa.String(length=20), nullable=True, comment='分发情况'),
sa.Column('project_name', sa.String(length=200), nullable=True, comment='项目名称'),
sa.Column('investor_name', sa.String(length=30), nullable=True, comment='投资方名称'),
sa.Column('investor_district', sa.String(length=30), nullable=True, comment='投资方所在地'),
sa.Column('project_type', sa.String(length=30), nullable=True, comment='项目类型'),
sa.Column('investment_volume', sa.Float(), nullable=True, comment='总投资额(万元)'),
sa.Column('project_year', sa.String(length=30), nullable=True, comment='项目年份'),
sa.Column('project_info', sa.String(length=300), nullable=True, comment='项目基本情况'),
sa.Column('thread_people', sa.String(length=30), nullable=True, comment='线索提供人'),
sa.Column('thread_people_unity', sa.String(length=30), nullable=True, comment='线索提供人单位或职务'),
sa.Column('thread_people_mobile', sa.String(length=30), nullable=True, comment='线索提供人联系方式'),
sa.Column('thread_progress', sa.String(length=30), nullable=True, comment='线索进展'),
sa.Column('upload_unity', sa.String(length=20), nullable=True, comment='上传部门'),
sa.Column('upload_people', sa.String(length=20), nullable=True, comment='上传人'),
sa.Column('upload_time', sa.String(length=30), nullable=True, comment='上传时间'),
sa.Column('project_num', sa.String(length=30), nullable=True, comment='项目编号'),
sa.Column('investment_volume1', sa.Float(), nullable=True, comment='拟引资额(万元)'),
sa.Column('project_info1', sa.String(length=300), nullable=True, comment='项目方基本情况'),
sa.Column('project_schedule', sa.String(length=20), nullable=True, comment='项目进展'),
sa.Column('stop_reason', sa.String(length=20), nullable=True, comment='暂停或终止原因'),
sa.Column('thread_source', sa.String(length=20), nullable=True, comment='线索来源'),
sa.Column('cooperation_way', sa.String(length=20), nullable=True, comment='合作方式'),
sa.Column('other_source', sa.String(length=200), nullable=True, comment='其他来源说明'),
sa.Column('remark', sa.String(length=200), nullable=True, comment='备注'),
sa.PrimaryKeyConstraint('id'),
comment='四库管理-项目信息表'
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('siku_project')
# ### end Alembic commands ###
"""empty message
Revision ID: 4257b2a8190f
Revises: 92105a57ac34
Create Date: 2023-09-25 11:16:08.593938
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '4257b2a8190f'
down_revision = '92105a57ac34'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('industry_chain1',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('industry_name', sa.String(length=20), nullable=True, comment='行业名称'),
sa.Column('icon_url', sa.String(length=255), nullable=True, comment='未选中时行业图标'),
sa.Column('icon_url1', sa.String(length=255), nullable=True, comment='选中时行业图标'),
sa.Column('status', sa.Integer(), nullable=True, comment='启用状态1启用,2禁用'),
sa.Column('industry_type', sa.Integer(), nullable=True, comment='行业类型(0是产业集群,1是上游行业,2是中游行业,3是下游行业)'),
sa.Column('relate_id', sa.Integer(), nullable=True, comment='关系id(关联哪个产业环节'),
sa.Column('chain_id', sa.Integer(), nullable=True, comment='关系id(关联哪个产业链'),
sa.Column('enterprise_num', sa.Integer(), nullable=True, comment='相关全企业表数量'),
sa.PrimaryKeyConstraint('id'),
comment='新版产业链数据数据表'
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('industry_chain1')
# ### end Alembic commands ###
"""empty message
Revision ID: 480d44ac277f
Revises: 2ff5b7509dc4
Create Date: 2022-12-29 10:30:19.137844
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '480d44ac277f'
down_revision = '2ff5b7509dc4'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('industrydistribute',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('industry_name', sa.String(length=20), nullable=True, comment='行业名称'),
sa.Column('industry_num', sa.Integer(), nullable=True, comment='个数'),
sa.Column('investment_volume', sa.Float(), nullable=True, comment='投资额(亿元)'),
sa.PrimaryKeyConstraint('id'),
comment='招商驾驶舱开工项目产业分布数据'
)
op.alter_column('money_arrive', 'arrive_money',
existing_type=mysql.FLOAT(),
comment='固定资产投资项目资金到位额',
existing_comment='固定资产投资项目资金到位额(',
existing_nullable=True)
op.alter_column('user', 'role_id',
existing_type=mysql.INTEGER(display_width=11),
comment='角色id ',
existing_comment='角色id',
existing_nullable=True)
op.alter_column('user', 'status',
existing_type=mysql.INTEGER(display_width=11),
comment='0禁止,1通过,2再审,3驳回',
existing_comment='0禁止,1在用',
existing_nullable=True)
op.alter_column('user', 'position',
existing_type=mysql.VARCHAR(length=128),
comment='职务',
existing_comment='现任职务(职务)',
existing_nullable=True)
op.alter_column('user', 'belong_organization',
existing_type=mysql.VARCHAR(length=30),
comment='单位',
existing_comment='现任工作机构、单位(政府机构,局)',
existing_nullable=True)
op.alter_column('user', 'belong_department',
existing_type=mysql.VARCHAR(length=30),
comment='部门',
existing_comment='所在部门(部门)',
existing_nullable=True)
op.drop_constraint('user_ibfk_1', 'user', type_='foreignkey')
op.drop_column('user', 'level')
op.drop_column('user', 'charge_organization')
op.drop_column('user', 'email')
op.drop_column('user', 'is_department_manager')
op.drop_column('user', 'is_organization_manager')
op.drop_column('user', 'age')
op.drop_column('user', 'function')
op.drop_column('user', 'sex')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('user', sa.Column('sex', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='性别,男1女2'))
op.add_column('user', sa.Column('function', mysql.TEXT(), nullable=True, comment='工作职能 ---个人中心'))
op.add_column('user', sa.Column('age', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='年龄'))
op.add_column('user', sa.Column('is_organization_manager', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='是否是机构负责人'))
op.add_column('user', sa.Column('is_department_manager', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='是否是部门负责人'))
op.add_column('user', sa.Column('email', mysql.VARCHAR(length=20), nullable=True, comment='邮箱'))
op.add_column('user', sa.Column('charge_organization', mysql.VARCHAR(length=30), nullable=True, comment='是机构负责人的话,所负责的机构'))
op.add_column('user', sa.Column('level', mysql.VARCHAR(length=128), nullable=True, comment='职级(职级) 跟role_id对应'))
op.create_foreign_key('user_ibfk_1', 'user', 'role', ['role_id'], ['id'])
op.alter_column('user', 'belong_department',
existing_type=mysql.VARCHAR(length=30),
comment='所在部门(部门)',
existing_comment='部门',
existing_nullable=True)
op.alter_column('user', 'belong_organization',
existing_type=mysql.VARCHAR(length=30),
comment='现任工作机构、单位(政府机构,局)',
existing_comment='单位',
existing_nullable=True)
op.alter_column('user', 'position',
existing_type=mysql.VARCHAR(length=128),
comment='现任职务(职务)',
existing_comment='职务',
existing_nullable=True)
op.alter_column('user', 'status',
existing_type=mysql.INTEGER(display_width=11),
comment='0禁止,1在用',
existing_comment='0禁止,1通过,2再审,3驳回',
existing_nullable=True)
op.alter_column('user', 'role_id',
existing_type=mysql.INTEGER(display_width=11),
comment='角色id',
existing_comment='角色id ',
existing_nullable=True)
op.alter_column('money_arrive', 'arrive_money',
existing_type=mysql.FLOAT(),
comment='固定资产投资项目资金到位额(',
existing_comment='固定资产投资项目资金到位额',
existing_nullable=True)
op.drop_table('industrydistribute')
# ### end Alembic commands ###
"""empty message
Revision ID: 4875ed38bd46
Revises: 12cd8a15569b
Create Date: 2023-03-09 18:24:10.892486
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '4875ed38bd46'
down_revision = '12cd8a15569b'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('company', sa.Column('company_id', sa.String(length=255), nullable=True, comment='企业id'))
op.create_index(op.f('ix_company_company_id'), 'company', ['company_id'], unique=False)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f('ix_company_company_id'), table_name='company')
op.drop_column('company', 'company_id')
# ### end Alembic commands ###
"""empty message
Revision ID: 48b5fb3c737c
Revises: 3b60b8db0e63
Create Date: 2023-03-01 10:45:18.627649
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '48b5fb3c737c'
down_revision = '3b60b8db0e63'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('carrier_build', sa.Column('other_attract_status', sa.String(length=20), nullable=True, comment='其他产业名称'))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('carrier_build', 'other_attract_status')
# ### end Alembic commands ###
"""empty message
Revision ID: 49d31ab855b4
Revises: 359190e47912
Create Date: 2023-02-16 11:02:20.797560
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '49d31ab855b4'
down_revision = '359190e47912'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('labor_cost',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='园区主键id'),
sa.Column('district', sa.String(length=255), nullable=True, comment='区县名称'),
sa.Column('endowment_insurance1', sa.Float(), nullable=True, comment='公司缴xx %'),
sa.Column('endowment_insurance2', sa.Float(), nullable=True, comment='个人缴xx %'),
sa.Column('unemployment_insurance1', sa.Float(), nullable=True, comment='公司缴XX %'),
sa.Column('unemployment_insurance2', sa.Float(), nullable=True, comment='个人缴X %'),
sa.Column('injury_insurance1', sa.Float(), nullable=True, comment='公司缴XX %'),
sa.Column('injury_insurance2', sa.Float(), nullable=True, comment='个人缴X %'),
sa.Column('maternity_insurance1', sa.Float(), nullable=True, comment='公司缴XX %'),
sa.Column('maternity_insurance2', sa.Float(), nullable=True, comment='个人缴X %'),
sa.Column('medical_insurance1', sa.Float(), nullable=True, comment='公司缴XX %'),
sa.Column('medical_insurance2', sa.Float(), nullable=True, comment='个人缴X %'),
sa.Column('wage_rates', sa.Float(), nullable=True, comment='工资标准(人社局)'),
sa.Column('month_wage_rates', sa.Float(), nullable=True, comment='月最低工资工资标准'),
sa.Column('hour_wage_rates', sa.Float(), nullable=True, comment='非全日制用工小时最低工资标准'),
sa.PrimaryKeyConstraint('id'),
comment='现状图谱-投资成本-劳动力成本'
)
op.alter_column('district_resource', 'district',
existing_type=mysql.VARCHAR(length=255),
comment='区县名称',
existing_comment='园区名称',
existing_nullable=True)
op.create_table_comment(
'district_resource',
'现状图谱-投资成本-水电气暖价格',
existing_comment='产业现状图谱-产业载体园区信息表',
schema=None
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table_comment(
'district_resource',
'产业现状图谱-产业载体园区信息表',
existing_comment='现状图谱-投资成本-水电气暖价格',
schema=None
)
op.alter_column('district_resource', 'district',
existing_type=mysql.VARCHAR(length=255),
comment='园区名称',
existing_comment='区县名称',
existing_nullable=True)
op.drop_table('labor_cost')
# ### end Alembic commands ###
"""create table
Revision ID: 4c7e28f5420d
Revises: 842339173242
Create Date: 2021-12-07 16:05:58.521175
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '4c7e28f5420d'
down_revision = '842339173242'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table_comment(
'induzone',
'产业现状图谱-产业载体园区信息表',
existing_comment='晋城园区信息表',
schema=None
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table_comment(
'induzone',
'晋城园区信息表',
existing_comment='产业现状图谱-产业载体园区信息表',
schema=None
)
# ### end Alembic commands ###
"""empty message
Revision ID: 4ee42e22970a
Revises: 49d31ab855b4
Create Date: 2023-02-16 11:19:13.956847
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '4ee42e22970a'
down_revision = '49d31ab855b4'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('labor_cost', 'endowment_insurance1',
existing_type=mysql.FLOAT(),
comment='养老保险公司缴xx %',
existing_comment='公司缴xx %',
existing_nullable=True)
op.alter_column('labor_cost', 'endowment_insurance2',
existing_type=mysql.FLOAT(),
comment='养老保险个人缴xx %',
existing_comment='个人缴xx %',
existing_nullable=True)
op.alter_column('labor_cost', 'unemployment_insurance1',
existing_type=mysql.FLOAT(),
comment='失业保险公司缴XX %',
existing_comment='公司缴XX %',
existing_nullable=True)
op.alter_column('labor_cost', 'unemployment_insurance2',
existing_type=mysql.FLOAT(),
comment='失业保险个人缴X %',
existing_comment='个人缴X %',
existing_nullable=True)
op.alter_column('labor_cost', 'injury_insurance1',
existing_type=mysql.FLOAT(),
comment='工伤保险公司缴XX %',
existing_comment='公司缴XX %',
existing_nullable=True)
op.alter_column('labor_cost', 'injury_insurance2',
existing_type=mysql.FLOAT(),
comment='工伤保险个人缴X %',
existing_comment='个人缴X %',
existing_nullable=True)
op.alter_column('labor_cost', 'maternity_insurance1',
existing_type=mysql.FLOAT(),
comment='生育保险公司缴XX %',
existing_comment='公司缴XX %',
existing_nullable=True)
op.alter_column('labor_cost', 'maternity_insurance2',
existing_type=mysql.FLOAT(),
comment='生育保险个人缴X %',
existing_comment='个人缴X %',
existing_nullable=True)
op.alter_column('labor_cost', 'medical_insurance1',
existing_type=mysql.FLOAT(),
comment='医疗保险公司缴XX %',
existing_comment='公司缴XX %',
existing_nullable=True)
op.alter_column('labor_cost', 'medical_insurance2',
existing_type=mysql.FLOAT(),
comment='医疗保险个人缴X %',
existing_comment='个人缴X %',
existing_nullable=True)
op.drop_column('labor_cost', 'wage_rates')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('labor_cost', sa.Column('wage_rates', mysql.FLOAT(), nullable=True, comment='工资标准(人社局)'))
op.alter_column('labor_cost', 'medical_insurance2',
existing_type=mysql.FLOAT(),
comment='个人缴X %',
existing_comment='医疗保险个人缴X %',
existing_nullable=True)
op.alter_column('labor_cost', 'medical_insurance1',
existing_type=mysql.FLOAT(),
comment='公司缴XX %',
existing_comment='医疗保险公司缴XX %',
existing_nullable=True)
op.alter_column('labor_cost', 'maternity_insurance2',
existing_type=mysql.FLOAT(),
comment='个人缴X %',
existing_comment='生育保险个人缴X %',
existing_nullable=True)
op.alter_column('labor_cost', 'maternity_insurance1',
existing_type=mysql.FLOAT(),
comment='公司缴XX %',
existing_comment='生育保险公司缴XX %',
existing_nullable=True)
op.alter_column('labor_cost', 'injury_insurance2',
existing_type=mysql.FLOAT(),
comment='个人缴X %',
existing_comment='工伤保险个人缴X %',
existing_nullable=True)
op.alter_column('labor_cost', 'injury_insurance1',
existing_type=mysql.FLOAT(),
comment='公司缴XX %',
existing_comment='工伤保险公司缴XX %',
existing_nullable=True)
op.alter_column('labor_cost', 'unemployment_insurance2',
existing_type=mysql.FLOAT(),
comment='个人缴X %',
existing_comment='失业保险个人缴X %',
existing_nullable=True)
op.alter_column('labor_cost', 'unemployment_insurance1',
existing_type=mysql.FLOAT(),
comment='公司缴XX %',
existing_comment='失业保险公司缴XX %',
existing_nullable=True)
op.alter_column('labor_cost', 'endowment_insurance2',
existing_type=mysql.FLOAT(),
comment='个人缴xx %',
existing_comment='养老保险个人缴xx %',
existing_nullable=True)
op.alter_column('labor_cost', 'endowment_insurance1',
existing_type=mysql.FLOAT(),
comment='公司缴xx %',
existing_comment='养老保险公司缴xx %',
existing_nullable=True)
# ### end Alembic commands ###
"""empty message
Revision ID: 4ff348e88f11
Revises: 367cd2f84fd1
Create Date: 2023-02-22 14:14:02.931883
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '4ff348e88f11'
down_revision = '367cd2f84fd1'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('carrier_land', sa.Column('detail_address', sa.String(length=50), nullable=True, comment='土地位置'))
op.drop_column('carrier_land', 'location')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('carrier_land', sa.Column('location', mysql.VARCHAR(length=50), nullable=True, comment='土地位置'))
op.drop_column('carrier_land', 'detail_address')
# ### end Alembic commands ###
"""empty message
Revision ID: 54d8004c6a64
Revises: 8046440f2a2d
Create Date: 2023-02-22 13:57:53.524946
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '54d8004c6a64'
down_revision = '8046440f2a2d'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('carrier_build')
op.drop_table('carrier_land')
op.drop_table('carrier_factory')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('carrier_factory',
sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('district_name', mysql.VARCHAR(length=50), nullable=True, comment='区域名称'),
sa.Column('factory_name', mysql.VARCHAR(length=50), nullable=True, comment='厂房名称'),
sa.Column('is_standard', mysql.VARCHAR(length=10), nullable=True, comment='是否为标准化厂房(是或否)'),
sa.Column('rent_status', mysql.VARCHAR(length=10), nullable=True, comment='是否对外租赁(是或否)'),
sa.Column('rent_money', mysql.VARCHAR(length=20), nullable=True, comment='租金范围(元/平米/天)'),
sa.Column('detail_address', mysql.VARCHAR(length=20), nullable=True, comment='详细地址'),
sa.Column('factory_area', mysql.VARCHAR(length=20), nullable=True, comment='建筑面积(㎡)'),
sa.Column('cover_land_area', mysql.VARCHAR(length=20), nullable=True, comment='占地面积(㎡)'),
sa.Column('cover_land_area_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='占地面积范围id(1:0-500㎡;2:500-1000㎡;3:1000-2000㎡;4:2000-5000㎡;5:5000-10000㎡)'),
sa.Column('industry_name', mysql.VARCHAR(length=255), nullable=True, comment='产业名称'),
sa.Column('property_type', mysql.VARCHAR(length=50), nullable=True, comment='产权类型'),
sa.Column('construction_time', mysql.VARCHAR(length=20), nullable=True, comment='建设时间(例如:2022年)'),
sa.Column('upload_time', mysql.DATETIME(), nullable=True, comment='数据上传时间'),
sa.Column('upload_people', mysql.VARCHAR(length=20), nullable=True, comment='数据上传人名字'),
sa.Column('upload_people_id', mysql.VARCHAR(length=20), nullable=True, comment='数据上传人用户id'),
sa.Column('upload_people_role_id', mysql.VARCHAR(length=20), nullable=True, comment='数据上传人权限id'),
sa.Column('upload_people_belong', mysql.VARCHAR(length=100), nullable=True, comment='数据上传人所属区县、机构、部门'),
sa.Column('fix_time', mysql.DATETIME(), nullable=True, comment='数据修改时间'),
sa.Column('fix_people', mysql.VARCHAR(length=20), nullable=True, comment='数据修改人名字'),
sa.Column('factory_status', mysql.VARCHAR(length=50), nullable=True, comment='厂房状态'),
sa.Column('audit_status', mysql.VARCHAR(length=20), nullable=True, comment='审核状态 0为未审核;1为审核通过;2为提交;3为驳回;4未通过;'),
sa.Column('audit_message', mysql.VARCHAR(length=50), nullable=True, comment='审核附言'),
sa.Column('lng', mysql.VARCHAR(length=50), nullable=True, comment='经度'),
sa.Column('lat', mysql.VARCHAR(length=50), nullable=True, comment='维度'),
sa.Column('factory_info', mysql.VARCHAR(length=255), nullable=True, comment='厂房介绍'),
sa.Column('inside_picture_url', mysql.VARCHAR(length=255), nullable=True, comment='内部照片url'),
sa.Column('outer_picture_url', mysql.VARCHAR(length=255), nullable=True, comment='外部照片url'),
sa.Column('price_url', mysql.VARCHAR(length=255), nullable=True, comment='平面图url'),
sa.Column('empty_area', mysql.VARCHAR(length=20), nullable=True, comment='闲置面积(㎡)'),
sa.Column('factory_structure', mysql.VARCHAR(length=20), nullable=True, comment='建筑结构'),
sa.Column('width', mysql.VARCHAR(length=20), nullable=True, comment='跨度(米)'),
sa.Column('high', mysql.VARCHAR(length=20), nullable=True, comment='层高(米)'),
sa.Column('bearing', mysql.VARCHAR(length=20), nullable=True, comment='承重(500kg/m2)'),
sa.Column('linkman', mysql.VARCHAR(length=20), nullable=True, comment='联系人'),
sa.Column('link_mobile', mysql.VARCHAR(length=20), nullable=True, comment='联系方式'),
sa.Column('is_electric', mysql.VARCHAR(length=10), nullable=True, comment='是否已通电(是或否)'),
sa.Column('is_water', mysql.VARCHAR(length=10), nullable=True, comment='是否已通水(是或否)'),
sa.Column('is_warm', mysql.VARCHAR(length=10), nullable=True, comment='是否已通暖(是或否)'),
sa.Column('is_gas', mysql.VARCHAR(length=10), nullable=True, comment='是否已通燃气(是或否)'),
sa.Column('is_network', mysql.VARCHAR(length=10), nullable=True, comment='是否已通网络(是或否)'),
sa.Column('is_lift', mysql.VARCHAR(length=10), nullable=True, comment='是否有电梯(是或否)'),
sa.Column('lift_num', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='电梯数量(部,填写整数)'),
sa.Column('is_car_space', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='是否有车位(是1否0)'),
sa.Column('layer_num', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='总层数(层,填写整数)'),
sa.Column('attract_status', mysql.VARCHAR(length=20), nullable=True, comment='拟招引状态'),
sa.Column('cooperation_model', mysql.VARCHAR(length=20), nullable=True, comment='合作模式'),
sa.Column('attract_advantage', mysql.VARCHAR(length=255), nullable=True, comment='招商优势'),
sa.Column('policy', mysql.VARCHAR(length=255), nullable=True, comment='相关政策'),
sa.PrimaryKeyConstraint('id'),
comment='载体资源库-厂房详情表',
mysql_comment='载体资源库-厂房详情表',
mysql_default_charset='utf8',
mysql_engine='InnoDB'
)
op.create_table('carrier_land',
sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('district_name', mysql.VARCHAR(length=50), nullable=True, comment='区域名称'),
sa.Column('land_name', mysql.VARCHAR(length=50), nullable=True, comment='土地名称'),
sa.Column('industry_name', mysql.VARCHAR(length=255), nullable=True, comment='产业名称'),
sa.Column('land_nature', mysql.VARCHAR(length=20), nullable=True, comment='土地性质)'),
sa.Column('land_nature_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='土地性质id(1:农用地;2:商业用地;3:建设用地;4:旅游用地;5:居民用地。)'),
sa.Column('detail_address', mysql.VARCHAR(length=20), nullable=True, comment='详细地址'),
sa.Column('lng', mysql.VARCHAR(length=50), nullable=True, comment='经度'),
sa.Column('lat', mysql.VARCHAR(length=50), nullable=True, comment='维度'),
sa.Column('total_area', mysql.VARCHAR(length=20), nullable=True, comment='总面积(㎡)'),
sa.Column('total_area_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='总面积范围id(1:0-500㎡;2:500-1000㎡;3:1000-2000㎡;4:2000-5000㎡;5:5000-10000㎡)'),
sa.Column('industry_type', mysql.VARCHAR(length=20), nullable=True, comment='产业类型'),
sa.Column('jing_area', mysql.VARCHAR(length=20), nullable=True, comment='净面积(㎡)'),
sa.Column('transfer_year', mysql.VARCHAR(length=20), nullable=True, comment='出让年限(年)'),
sa.Column('transfer_year_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='出让年限范围id(1:0-5年;2:5-10年;3:10-15年;4:15-20年;5:20年以上)'),
sa.Column('land_code', mysql.VARCHAR(length=50), nullable=True, comment='土地编码'),
sa.Column('upload_time', mysql.DATETIME(), nullable=True, comment='数据上传时间'),
sa.Column('upload_people', mysql.VARCHAR(length=20), nullable=True, comment='数据上传人名字'),
sa.Column('upload_people_id', mysql.VARCHAR(length=20), nullable=True, comment='数据上传人用户id'),
sa.Column('upload_people_role_id', mysql.VARCHAR(length=20), nullable=True, comment='数据上传人权限id'),
sa.Column('upload_people_belong', mysql.VARCHAR(length=100), nullable=True, comment='数据上传人所属区县、机构、部门'),
sa.Column('fix_time', mysql.DATETIME(), nullable=True, comment='数据修改时间'),
sa.Column('fix_people', mysql.VARCHAR(length=20), nullable=True, comment='数据修改人名字'),
sa.Column('land_status', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='土地状态 0为闲置;1为占用'),
sa.Column('audit_status', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='审核状态 0为未审核;1为审核通过;2为提交;3为驳回;4未通过'),
sa.Column('audit_message', mysql.VARCHAR(length=50), nullable=True, comment='审核附言'),
sa.Column('linkman', mysql.VARCHAR(length=20), nullable=True, comment='联系人'),
sa.Column('link_mobile', mysql.VARCHAR(length=20), nullable=True, comment='联系方式'),
sa.Column('land_info', mysql.VARCHAR(length=255), nullable=True, comment='土地介绍'),
sa.Column('inside_picture_url', mysql.VARCHAR(length=255), nullable=True, comment='内部照片url'),
sa.Column('outer_picture_url', mysql.VARCHAR(length=255), nullable=True, comment='外部照片url'),
sa.Column('plot_ratio', mysql.VARCHAR(length=20), nullable=True, comment='容积率'),
sa.Column('sales_price', mysql.VARCHAR(length=20), nullable=True, comment='销售均价(毛坯)(万元)'),
sa.Column('max_sales_price', mysql.VARCHAR(length=20), nullable=True, comment='最高销售单价(万元)'),
sa.Column('max_car_space_price', mysql.VARCHAR(length=20), nullable=True, comment='车位最高销售单价'),
sa.Column('plan_target', mysql.VARCHAR(length=20), nullable=True, comment='规划指标'),
sa.Column('plan_condition', mysql.VARCHAR(length=20), nullable=True, comment='规划条件'),
sa.Column('price_url', mysql.VARCHAR(length=255), nullable=True, comment='规划图url'),
sa.Column('surround_facility', mysql.VARCHAR(length=255), nullable=True, comment='周边配套(多个,列表形式,顿号分隔)'),
sa.Column('education_name', mysql.VARCHAR(length=255), nullable=True, comment='教育机构名称(多个,列表形式,顿号分隔)'),
sa.Column('medical_name', mysql.VARCHAR(length=255), nullable=True, comment='医疗设施名称(多个,列表形式,顿号分隔)'),
sa.Column('park_name', mysql.VARCHAR(length=255), nullable=True, comment='大型公园名称(多个,列表形式,顿号分隔)'),
sa.Column('shangfu_center', mysql.VARCHAR(length=255), nullable=True, comment='商服中心(多个,列表形式,顿号分隔)'),
sa.Column('administration_center', mysql.VARCHAR(length=255), nullable=True, comment='行政中心(多个,列表形式,顿号分隔)'),
sa.Column('policy', mysql.VARCHAR(length=255), nullable=True, comment='相关政策(多个,列表形式,顿号分隔)'),
sa.Column('attract_status', mysql.VARCHAR(length=20), nullable=True, comment='拟招引状态'),
sa.PrimaryKeyConstraint('id'),
comment='载体资源库-土地详情表',
mysql_comment='载体资源库-土地详情表',
mysql_default_charset='utf8',
mysql_engine='InnoDB'
)
op.create_table('carrier_build',
sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('district_name', mysql.VARCHAR(length=50), nullable=True, comment='区域名称'),
sa.Column('build_name', mysql.VARCHAR(length=50), nullable=True, comment='楼宇名称'),
sa.Column('industry_name', mysql.VARCHAR(length=255), nullable=True, comment='产业名称'),
sa.Column('industry_type', mysql.VARCHAR(length=20), nullable=True, comment='产业类型'),
sa.Column('total_area', mysql.VARCHAR(length=20), nullable=True, comment='总面积(㎡)'),
sa.Column('cover_land_area', mysql.VARCHAR(length=20), nullable=True, comment='占地面积(㎡)'),
sa.Column('build_type', mysql.VARCHAR(length=20), nullable=True, comment='楼宇类型'),
sa.Column('rent_rate', mysql.VARCHAR(length=20), nullable=True, comment='出租率'),
sa.Column('layer_num', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='总层数(层,填写整数)'),
sa.Column('detail_address', mysql.VARCHAR(length=50), nullable=True, comment='详细地址'),
sa.Column('lng', mysql.VARCHAR(length=50), nullable=True, comment='经度'),
sa.Column('lat', mysql.VARCHAR(length=50), nullable=True, comment='维度'),
sa.Column('construction_time', mysql.VARCHAR(length=20), nullable=True, comment='建设时间(例如:2022年)'),
sa.Column('upload_time', mysql.DATETIME(), nullable=True, comment='数据上传时间'),
sa.Column('upload_people', mysql.VARCHAR(length=20), nullable=True, comment='数据上传人'),
sa.Column('upload_people_id', mysql.VARCHAR(length=20), nullable=True, comment='数据上传人用户id'),
sa.Column('upload_people_role_id', mysql.VARCHAR(length=20), nullable=True, comment='数据上传人权限id'),
sa.Column('upload_people_belong', mysql.VARCHAR(length=100), nullable=True, comment='数据上传人所属区县、机构、部门'),
sa.Column('fix_time', mysql.DATETIME(), nullable=True, comment='数据修改时间'),
sa.Column('fix_people', mysql.VARCHAR(length=20), nullable=True, comment='数据修改人'),
sa.Column('build_status', mysql.VARCHAR(length=20), nullable=True, comment='楼宇状态'),
sa.Column('rent_money', mysql.VARCHAR(length=20), nullable=True, comment='租金范围(元/平米/天)'),
sa.Column('wuye_money', mysql.VARCHAR(length=20), nullable=True, comment='物业费(元/平米/天)'),
sa.Column('audit_status', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='审核状态 0为未审核;1为审核通过;2为提交;3为驳回;4未通过'),
sa.Column('audit_message', mysql.VARCHAR(length=50), nullable=True, comment='审核附言'),
sa.Column('build_info', mysql.VARCHAR(length=255), nullable=True, comment='楼宇介绍'),
sa.Column('inside_picture_url', mysql.VARCHAR(length=255), nullable=True, comment='内部照片url'),
sa.Column('outer_picture_url', mysql.VARCHAR(length=255), nullable=True, comment='外部照片url'),
sa.Column('price_url', mysql.VARCHAR(length=255), nullable=True, comment='平面图url'),
sa.Column('car_space_num', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='车位数(个,填写整数)'),
sa.Column('lift_num', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='电梯数(部,填写整数)'),
sa.Column('rentout_status', mysql.VARCHAR(length=20), nullable=True, comment='出租状态'),
sa.Column('linkman', mysql.VARCHAR(length=20), nullable=True, comment='联系人'),
sa.Column('link_mobile', mysql.VARCHAR(length=20), nullable=True, comment='联系方式'),
sa.Column('build_area', mysql.VARCHAR(length=20), nullable=True, comment='建筑面积(㎡)'),
sa.Column('empty_area', mysql.VARCHAR(length=20), nullable=True, comment='闲置面积(㎡)'),
sa.Column('build_structure', mysql.VARCHAR(length=20), nullable=True, comment='建筑结构'),
sa.Column('owner', mysql.VARCHAR(length=20), nullable=True, comment='权属人'),
sa.Column('attract_status', mysql.VARCHAR(length=20), nullable=True, comment='拟招引状态'),
sa.Column('attract_industry_status', mysql.VARCHAR(length=20), nullable=True, comment='招引业态'),
sa.Column('cooperation_model', mysql.VARCHAR(length=20), nullable=True, comment='合作模式'),
sa.Column('attract_advantage', mysql.VARCHAR(length=255), nullable=True, comment='招商优势'),
sa.Column('policy', mysql.VARCHAR(length=255), nullable=True, comment='优惠政策'),
sa.PrimaryKeyConstraint('id'),
comment='载体资源库-楼宇详情表',
mysql_comment='载体资源库-楼宇详情表',
mysql_default_charset='utf8',
mysql_engine='InnoDB'
)
# ### end Alembic commands ###
"""empty message
Revision ID: 567fa4c5fc84
Revises: 0aad01ae0dda
Create Date: 2022-11-16 21:38:20.017395
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '567fa4c5fc84'
down_revision = '0aad01ae0dda'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('project_file',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('flag', sa.Integer(), nullable=True, comment='2为对接库,3为签约库,4为开工库'),
sa.Column('file_type', sa.Integer(), nullable=True, comment='1文件,2图片'),
sa.Column('file_url', sa.String(length=300), nullable=True, comment='相关印证资料图片url'),
sa.Column('file_name', sa.String(length=20), nullable=True, comment='相关印证资料图片名称'),
sa.Column('project_id', sa.Integer(), nullable=True, comment='外键id,项目id'),
sa.ForeignKeyConstraint(['project_id'], ['siku_project.id'], ),
sa.PrimaryKeyConstraint('id'),
comment='四库管理对接库-相关印证资料图片'
)
op.drop_table('joint_img')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('joint_img',
sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('flag', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='2为对接库,3为签约库,4为开工库'),
sa.Column('img_url', mysql.VARCHAR(length=300), nullable=True, comment='相关印证资料图片url'),
sa.Column('img_name', mysql.VARCHAR(length=20), nullable=True, comment='相关印证资料图片名称'),
sa.Column('project_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='外键id,项目id'),
sa.ForeignKeyConstraint(['project_id'], ['siku_project.id'], name='joint_img_ibfk_1'),
sa.PrimaryKeyConstraint('id'),
comment='四库管理对接库-相关印证资料图片',
mysql_comment='四库管理对接库-相关印证资料图片',
mysql_default_charset='utf8',
mysql_engine='InnoDB'
)
op.drop_table('project_file')
# ### end Alembic commands ###
"""empty message
Revision ID: 577f52798418
Revises: 6de45042c0d0
Create Date: 2023-01-12 15:54:17.153772
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '577f52798418'
down_revision = '6de45042c0d0'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('enterprise', sa.Column('sxonhun', sa.String(length=32), nullable=True))
op.add_column('enterprise', sa.Column('scale', sa.String(length=32), nullable=True))
op.add_column('enterprise', sa.Column('serve', sa.String(length=32), nullable=True))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('enterprise', 'serve')
op.drop_column('enterprise', 'scale')
op.drop_column('enterprise', 'sxonhun')
# ### end Alembic commands ###
"""empty message
Revision ID: 5faec18e77e2
Revises: 3179f93f4bad
Create Date: 2022-11-24 10:28:38.209707
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '5faec18e77e2'
down_revision = '3179f93f4bad'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('project_file', sa.Column('project_manager_id', sa.Integer(), nullable=True, comment='外键id,项目id'))
op.drop_constraint('project_file_ibfk_2', 'project_file', type_='foreignkey')
op.create_foreign_key(None, 'project_file', 'project_management', ['project_manager_id'], ['id'])
op.drop_column('project_file', 'project_id1')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('project_file', sa.Column('project_id1', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='外键id,项目id'))
op.drop_constraint(None, 'project_file', type_='foreignkey')
op.create_foreign_key('project_file_ibfk_2', 'project_file', 'project_management', ['project_id1'], ['id'])
op.drop_column('project_file', 'project_manager_id')
# ### end Alembic commands ###
"""empty message
Revision ID: 6214c8d7cb5d
Revises: 9ef30d50f9e0
Create Date: 2023-01-05 14:33:32.126051
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '6214c8d7cb5d'
down_revision = '9ef30d50f9e0'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('industry_chain', sa.Column('icon_url', sa.String(length=255), nullable=True, comment='行业图标'))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('industry_chain', 'icon_url')
# ### end Alembic commands ###
"""empty message
Revision ID: 63cc590aac22
Revises: b9af264d3544
Create Date: 2022-11-24 10:06:47.863898
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '63cc590aac22'
down_revision = 'b9af264d3544'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('shanxi_target', sa.Column('district_name', sa.String(length=30), nullable=True, comment='区县名称'))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('shanxi_target', 'district_name')
# ### end Alembic commands ###
"""empty message
Revision ID: 6470d982afcb
Revises: 7b3c7cc35c61
Create Date: 2022-11-24 20:18:35.732056
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '6470d982afcb'
down_revision = '7b3c7cc35c61'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('jc_target', sa.Column('file_name', sa.String(length=30), nullable=True, comment='文件名称'))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('jc_target', 'file_name')
# ### end Alembic commands ###
"""empty message
Revision ID: 64b32417349b
Revises: 1249c599d875
Create Date: 2023-02-22 00:27:40.254685
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '64b32417349b'
down_revision = '1249c599d875'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('investment_consultation',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('project_name', sa.String(length=20), nullable=True, comment='项目名称'),
sa.Column('investor', sa.Integer(), nullable=True, comment='投资方名称'),
sa.Column('investor_place', sa.String(length=100), nullable=True, comment='投资方所在地'),
sa.Column('project_type', sa.String(length=20), nullable=True, comment='项目类型'),
sa.Column('investment_volume', sa.Text(), nullable=True, comment='总投资额'),
sa.Column('basic_information', sa.Text(), nullable=True, comment='项目方基本情况'),
sa.Column('land_area', sa.Text(), nullable=True, comment='拟落地区域'),
sa.Column('flag', sa.Integer(), nullable=True, comment='是否已回复 0否1是'),
sa.Column('reply_content', sa.Text(), nullable=True, comment='回复内容'),
sa.PrimaryKeyConstraint('id'),
comment='小程序-客户咨询信息表'
)
op.add_column('company', sa.Column('chain_master', sa.String(length=20), nullable=True, comment='链主企业'))
op.create_table_comment(
'introduction_meet',
'小程序-推介会数据表',
existing_comment='推介会数据表',
schema=None
)
op.add_column('investment_information', sa.Column('content', sa.Text(), nullable=True, comment='正文'))
op.create_table_comment(
'investment_information',
'小程序-招商资讯数据表',
existing_comment='招商资讯数据表',
schema=None
)
op.drop_column('investment_information', 'info')
op.add_column('zaiti_build', sa.Column('lng', sa.String(length=50), nullable=True, comment='经度'))
op.add_column('zaiti_build', sa.Column('lat', sa.String(length=50), nullable=True, comment='维度'))
op.add_column('zaiti_factory', sa.Column('lng', sa.String(length=50), nullable=True, comment='经度'))
op.add_column('zaiti_factory', sa.Column('lat', sa.String(length=50), nullable=True, comment='维度'))
op.add_column('zaiti_land', sa.Column('lng', sa.String(length=50), nullable=True, comment='经度'))
op.add_column('zaiti_land', sa.Column('lat', sa.String(length=50), nullable=True, comment='维度'))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('zaiti_land', 'lat')
op.drop_column('zaiti_land', 'lng')
op.drop_column('zaiti_factory', 'lat')
op.drop_column('zaiti_factory', 'lng')
op.drop_column('zaiti_build', 'lat')
op.drop_column('zaiti_build', 'lng')
op.add_column('investment_information', sa.Column('info', mysql.TEXT(), nullable=True, comment='介绍'))
op.create_table_comment(
'investment_information',
'招商资讯数据表',
existing_comment='小程序-招商资讯数据表',
schema=None
)
op.drop_column('investment_information', 'content')
op.create_table_comment(
'introduction_meet',
'推介会数据表',
existing_comment='小程序-推介会数据表',
schema=None
)
op.drop_column('company', 'chain_master')
op.drop_table('investment_consultation')
# ### end Alembic commands ###
"""empty message
Revision ID: 653e364e2467
Revises: 6214c8d7cb5d
Create Date: 2023-01-05 15:19:49.029798
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '653e364e2467'
down_revision = '6214c8d7cb5d'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('industry_chain', sa.Column('icon_url1', sa.String(length=255), nullable=True, comment='未选中时行业图标1'))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('industry_chain', 'icon_url1')
# ### end Alembic commands ###
"""empty message
Revision ID: 6552335d82e5
Revises: c842c3d27d7d
Create Date: 2023-02-22 17:07:23.152064
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '6552335d82e5'
down_revision = 'c842c3d27d7d'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('carrier_build', sa.Column('inside_picture_url', sa.String(length=255), nullable=True, comment='内部照片url'))
op.add_column('carrier_build', sa.Column('outer_picture_url', sa.String(length=255), nullable=True, comment='外部照片url'))
op.add_column('carrier_build', sa.Column('price_url', sa.String(length=255), nullable=True, comment='平面图url'))
op.drop_column('carrier_build', 'build_pic')
op.add_column('carrier_land', sa.Column('price_url', sa.String(length=20), nullable=True, comment='用地红线图'))
op.drop_column('carrier_land', 'red_line_map')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('carrier_land', sa.Column('red_line_map', mysql.VARCHAR(length=20), nullable=True, comment='用地红线图'))
op.drop_column('carrier_land', 'price_url')
op.add_column('carrier_build', sa.Column('build_pic', mysql.VARCHAR(length=20), nullable=True, comment='楼宇图片'))
op.drop_column('carrier_build', 'price_url')
op.drop_column('carrier_build', 'outer_picture_url')
op.drop_column('carrier_build', 'inside_picture_url')
# ### end Alembic commands ###
"""empty message
Revision ID: 657fa1fd4950
Revises: 86cebc03f6ec
Create Date: 2022-12-02 10:40:57.784706
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '657fa1fd4950'
down_revision = '86cebc03f6ec'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('siku_project', sa.Column('industry', sa.String(length=20), nullable=True, comment='所属行业-一级产业'))
op.add_column('siku_project', sa.Column('industry2', sa.String(length=20), nullable=True, comment='所属行业-二级产业'))
op.add_column('siku_project', sa.Column('provence', sa.String(length=30), nullable=True, comment='投资方省份'))
op.add_column('siku_project', sa.Column('city', sa.String(length=30), nullable=True, comment='投资方市'))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('siku_project', 'city')
op.drop_column('siku_project', 'provence')
op.drop_column('siku_project', 'industry2')
op.drop_column('siku_project', 'industry')
# ### end Alembic commands ###
"""empty message
Revision ID: 65b957f64433
Revises: 281173c29995
Create Date: 2022-03-03 16:25:20.832942
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '65b957f64433'
down_revision = '281173c29995'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('role', 'id',
existing_type=mysql.INTEGER(display_width=11),
comment='企业',
existing_nullable=False,
autoincrement=True)
op.alter_column('role', 'role_name',
existing_type=mysql.VARCHAR(length=255),
comment='角色名',
existing_nullable=True)
op.alter_column('role', 'role',
existing_type=mysql.VARCHAR(length=10),
comment='权限值 000000 0位位职级123,后面为权限01',
existing_nullable=True)
op.alter_column('role', 'info',
existing_type=mysql.VARCHAR(length=255),
comment='权限说明',
existing_nullable=True)
op.add_column('user', sa.Column('belong_organization', sa.String(length=30), nullable=True, comment='现任工作机构、单位(政府机构,局)'))
op.add_column('user', sa.Column('is_organization_manager', sa.Integer(), nullable=True, comment='是否是机构负责人'))
op.add_column('user', sa.Column('charge_organization', sa.String(length=30), nullable=True, comment='是机构负责人的话,所负责的机构'))
op.add_column('user', sa.Column('belong_department', sa.String(length=30), nullable=True, comment='所在部门(部门)'))
op.add_column('user', sa.Column('is_department_manager', sa.Integer(), nullable=True, comment='是否是部门负责人'))
op.alter_column('user', 'id',
existing_type=mysql.INTEGER(display_width=11),
comment='用户编号',
existing_nullable=False,
autoincrement=True)
op.alter_column('user', 'name',
existing_type=mysql.VARCHAR(length=32),
comment='用户名',
existing_nullable=True)
op.alter_column('user', 'password_hash',
existing_type=mysql.VARCHAR(length=128),
comment='加密的密码',
existing_nullable=True)
op.alter_column('user', 'real_name',
existing_type=mysql.VARCHAR(length=32),
comment='姓名',
existing_nullable=True)
op.alter_column('user', 'age',
existing_type=mysql.INTEGER(display_width=11),
comment='年龄',
existing_nullable=True)
op.alter_column('user', 'sex',
existing_type=mysql.INTEGER(display_width=11),
comment='性别,男1女2',
existing_nullable=True)
op.alter_column('user', 'mobile',
existing_type=mysql.VARCHAR(length=11),
comment='手机号',
existing_nullable=True)
op.alter_column('user', 'email',
existing_type=mysql.VARCHAR(length=20),
comment='邮箱',
existing_nullable=True)
op.alter_column('user', 'function',
existing_type=mysql.TEXT(),
comment='工作职能 ---个人中心',
existing_nullable=True)
op.alter_column('user', 'flag',
existing_type=mysql.INTEGER(display_width=11),
comment='普通1,政府2',
existing_nullable=True)
op.alter_column('user', 'status',
existing_type=mysql.INTEGER(display_width=11),
comment='通过1,在审2,驳回3',
existing_nullable=True)
op.alter_column('user', 'position',
existing_type=mysql.VARCHAR(length=128),
comment='现任职务(职务)',
existing_nullable=True)
op.alter_column('user', 'group',
existing_type=mysql.VARCHAR(length=128),
comment='所在组',
existing_nullable=True)
op.alter_column('user', 'level',
existing_type=mysql.VARCHAR(length=128),
comment='职级(职级) 跟role_id对应',
existing_nullable=True)
op.alter_column('user', 'leader',
existing_type=mysql.VARCHAR(length=32),
comment='领导(直属领导)',
existing_nullable=True)
op.alter_column('user', 'vxopenid',
existing_type=mysql.VARCHAR(length=128),
comment='微信openid',
existing_nullable=True)
op.alter_column('user', 'vxunionid',
existing_type=mysql.VARCHAR(length=128),
comment='微信unionid',
existing_nullable=True)
op.alter_column('user', 'role_id',
existing_type=mysql.INTEGER(display_width=11),
comment='角色id',
existing_nullable=True)
op.drop_column('user', 'unit')
op.drop_column('user', 'section')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('user', sa.Column('section', mysql.VARCHAR(length=128), nullable=True))
op.add_column('user', sa.Column('unit', mysql.VARCHAR(length=128), nullable=True))
op.alter_column('user', 'role_id',
existing_type=mysql.INTEGER(display_width=11),
comment=None,
existing_comment='角色id',
existing_nullable=True)
op.alter_column('user', 'vxunionid',
existing_type=mysql.VARCHAR(length=128),
comment=None,
existing_comment='微信unionid',
existing_nullable=True)
op.alter_column('user', 'vxopenid',
existing_type=mysql.VARCHAR(length=128),
comment=None,
existing_comment='微信openid',
existing_nullable=True)
op.alter_column('user', 'leader',
existing_type=mysql.VARCHAR(length=32),
comment=None,
existing_comment='领导(直属领导)',
existing_nullable=True)
op.alter_column('user', 'level',
existing_type=mysql.VARCHAR(length=128),
comment=None,
existing_comment='职级(职级) 跟role_id对应',
existing_nullable=True)
op.alter_column('user', 'group',
existing_type=mysql.VARCHAR(length=128),
comment=None,
existing_comment='所在组',
existing_nullable=True)
op.alter_column('user', 'position',
existing_type=mysql.VARCHAR(length=128),
comment=None,
existing_comment='现任职务(职务)',
existing_nullable=True)
op.alter_column('user', 'status',
existing_type=mysql.INTEGER(display_width=11),
comment=None,
existing_comment='通过1,在审2,驳回3',
existing_nullable=True)
op.alter_column('user', 'flag',
existing_type=mysql.INTEGER(display_width=11),
comment=None,
existing_comment='普通1,政府2',
existing_nullable=True)
op.alter_column('user', 'function',
existing_type=mysql.TEXT(),
comment=None,
existing_comment='工作职能 ---个人中心',
existing_nullable=True)
op.alter_column('user', 'email',
existing_type=mysql.VARCHAR(length=20),
comment=None,
existing_comment='邮箱',
existing_nullable=True)
op.alter_column('user', 'mobile',
existing_type=mysql.VARCHAR(length=11),
comment=None,
existing_comment='手机号',
existing_nullable=True)
op.alter_column('user', 'sex',
existing_type=mysql.INTEGER(display_width=11),
comment=None,
existing_comment='性别,男1女2',
existing_nullable=True)
op.alter_column('user', 'age',
existing_type=mysql.INTEGER(display_width=11),
comment=None,
existing_comment='年龄',
existing_nullable=True)
op.alter_column('user', 'real_name',
existing_type=mysql.VARCHAR(length=32),
comment=None,
existing_comment='姓名',
existing_nullable=True)
op.alter_column('user', 'password_hash',
existing_type=mysql.VARCHAR(length=128),
comment=None,
existing_comment='加密的密码',
existing_nullable=True)
op.alter_column('user', 'name',
existing_type=mysql.VARCHAR(length=32),
comment=None,
existing_comment='用户名',
existing_nullable=True)
op.alter_column('user', 'id',
existing_type=mysql.INTEGER(display_width=11),
comment=None,
existing_comment='用户编号',
existing_nullable=False,
autoincrement=True)
op.drop_column('user', 'is_department_manager')
op.drop_column('user', 'belong_department')
op.drop_column('user', 'charge_organization')
op.drop_column('user', 'is_organization_manager')
op.drop_column('user', 'belong_organization')
op.alter_column('role', 'info',
existing_type=mysql.VARCHAR(length=255),
comment=None,
existing_comment='权限说明',
existing_nullable=True)
op.alter_column('role', 'role',
existing_type=mysql.VARCHAR(length=10),
comment=None,
existing_comment='权限值 000000 0位位职级123,后面为权限01',
existing_nullable=True)
op.alter_column('role', 'role_name',
existing_type=mysql.VARCHAR(length=255),
comment=None,
existing_comment='角色名',
existing_nullable=True)
op.alter_column('role', 'id',
existing_type=mysql.INTEGER(display_width=11),
comment=None,
existing_comment='企业',
existing_nullable=False,
autoincrement=True)
# ### end Alembic commands ###
"""empty message
Revision ID: 6a08b8809873
Revises: f66650ce2fa6
Create Date: 2023-04-20 16:13:09.853305
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '6a08b8809873'
down_revision = 'f66650ce2fa6'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('enterprise111',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='企业主键id主键id'),
sa.Column('chain_master', sa.String(length=20), nullable=True, comment='链主企业'),
sa.Column('company_id', sa.String(length=255), nullable=True, comment='企业id'),
sa.Column('company_name', sa.String(length=255), nullable=True, comment='企业名'),
sa.Column('status', sa.String(length=32), nullable=True, comment='经营状态'),
sa.Column('legal', sa.String(length=255), nullable=True, comment='发定代表人'),
sa.Column('capital', sa.String(length=255), nullable=True, comment='注册资本,22万美元'),
sa.Column('capital_nums', sa.Float(), nullable=True, comment='注册资本转换成人民币数值'),
sa.Column('capital_id', sa.Integer(), nullable=True, comment='注册资本大小类型,0-100,1,100-500,2,500-1000,3,1000-5000,4,5000-10000,5,10000+,6'),
sa.Column('build_date', sa.DateTime(), nullable=True, comment='注册时间'),
sa.Column('yearid', sa.Integer(), nullable=True, comment='成立时间年限id(1-3,1)(3-5,2)(5-8,3)(8-10,4)(10-15,5)(15以上,6)'),
sa.Column('province', sa.String(length=32), nullable=True, comment='省'),
sa.Column('city', sa.String(length=32), nullable=True, comment='市'),
sa.Column('district', sa.String(length=32), nullable=True, comment='区'),
sa.Column('lng', sa.String(length=100), nullable=True, comment='经度'),
sa.Column('lat', sa.String(length=100), nullable=True, comment='纬度'),
sa.Column('p_lng', sa.String(length=100), nullable=True, comment='省经度'),
sa.Column('p_lat', sa.String(length=100), nullable=True, comment='省纬度'),
sa.Column('c_lng', sa.String(length=100), nullable=True, comment='市经度'),
sa.Column('c_lat', sa.String(length=100), nullable=True, comment='市纬度'),
sa.Column('d_lng', sa.String(length=100), nullable=True, comment='区经度'),
sa.Column('d_lat', sa.String(length=100), nullable=True, comment='区纬度'),
sa.Column('address', sa.String(length=255), nullable=True, comment='企业地址'),
sa.Column('telephone', sa.Text(), nullable=True, comment='电话'),
sa.Column('telephone_more', sa.Text(), nullable=True, comment='更多电话'),
sa.Column('email', sa.Text(), nullable=True, comment='邮箱'),
sa.Column('social_code', sa.String(length=100), nullable=True, comment='统一社会信用代码'),
sa.Column('tax_code', sa.String(length=100), nullable=True, comment='纳税人识别号'),
sa.Column('register_code', sa.String(length=100), nullable=True, comment='注册号'),
sa.Column('company_code', sa.String(length=100), nullable=True, comment='组织机构代码'),
sa.Column('bao_num', sa.Integer(), nullable=True, comment='参保人数'),
sa.Column('entype', sa.String(length=100), nullable=True, comment='企业类型'),
sa.Column('entypeid', sa.Integer(), nullable=True, comment='公司类型id(个人独资企业-1)(股份有限公司-2)(有限责任公司-3)(合伙企业-4)(集体所有制-5)(全民所有制企业-6)(外商企业-7)'),
sa.Column('scale_range', sa.Integer(), nullable=True, comment='企业规模id,1:20人以下,2:20-99人,3:100-499人,4:500-999人,5: 1000-4999人,6:5000-9999人,7:10000人'),
sa.Column('company_industry', sa.String(length=100), nullable=True, comment='所属行业'),
sa.Column('web_site', sa.String(length=255), nullable=True, comment='企业网址'),
sa.Column('business_scope', sa.Text(), nullable=True, comment='企业经营范围'),
sa.Column('register_org', sa.String(length=100), nullable=True, comment='登记机关'),
sa.Column('money_type', sa.String(length=100), nullable=True, comment='注册币种'),
sa.Column('money_type_id', sa.Integer(), nullable=True, comment='注册币种类型id'),
sa.Column('high_new', sa.String(length=32), nullable=True, comment='是否高新技术企业'),
sa.Column('parti_year', sa.Integer(), nullable=True, comment='高新企业注册年份'),
sa.Column('tbe', sa.String(length=32), nullable=True, comment='是否科技型中小企业'),
sa.Column('tbe_sjmy', sa.String(length=32), nullable=True, comment='是否为省级民营科技企业'),
sa.Column('zjtg', sa.String(length=32), nullable=True, comment='是否为专精特新企业'),
sa.Column('zjtg_gjjxjr', sa.String(length=32), nullable=True, comment='是否为国家级专精特新小巨人企业'),
sa.Column('zjtg_sjxjr', sa.String(length=32), nullable=True, comment='是否为省级专精特新小巨人企业'),
sa.Column('fianacing', sa.String(length=32), nullable=True, comment='是否为有融资企业'),
sa.Column('fianacing_rounds', sa.String(length=32), nullable=True, comment='融资轮次'),
sa.Column('roundid', sa.Integer(), nullable=True, comment='融资轮次id(天使/种子,1)(PreA/A+,2)(PreB/B+,3)(C轮以上,4)(收并购,5)(战略投资,6)(其他,7)'),
sa.Column('financing_amount', sa.Float(), nullable=True, comment='融资金额'),
sa.Column('software_copyright', sa.String(length=32), nullable=True, comment='是否为有软件著作权'),
sa.Column('num_software', sa.Integer(), nullable=True, comment='软件著作权个数'),
sa.Column('quoted_company', sa.String(length=32), nullable=True, comment='是否上市企业'),
sa.Column('public_sector', sa.String(length=32), nullable=True, comment='上市板块'),
sa.Column('public_id', sa.Integer(), nullable=True, comment='上市版块的id----360企业画像(A股,1)(创业股,2)(港股,3)(新三股,4)(新四股,5)(中小板,6)'),
sa.Column('foreign_investment', sa.String(length=32), nullable=True, comment='是否外商投资'),
sa.Column('patent', sa.String(length=32), nullable=True, comment='是否为有专利企业'),
sa.Column('num_patent', sa.Integer(), nullable=True, comment='专利个数'),
sa.Column('company_info', sa.Text(), nullable=True, comment='公司简介'),
sa.Column('dengl', sa.String(length=32), nullable=True, comment='瞪羚'),
sa.Column('unicorn', sa.String(length=32), nullable=True, comment='独角兽企业'),
sa.Column('isfive', sa.String(length=32), nullable=True, comment='是否中国500强'),
sa.Column('takingn', sa.Float(), nullable=True, comment='营收'),
sa.Column('hots', sa.Integer(), nullable=True, comment='企业热度(权重值)'),
sa.Column('c_name', sa.String(length=255), nullable=True, comment='行业类名'),
sa.Column('c_type', sa.Integer(), nullable=True, comment='行业类id'),
sa.Column('product_all', sa.String(length=255), nullable=True, comment='公司拥有产品'),
sa.Column('c_name1', sa.String(length=255), nullable=True, comment='行业类名'),
sa.Column('c_type1', sa.Integer(), nullable=True, comment='行业类id'),
sa.Column('product_all1', sa.String(length=255), nullable=True, comment='公司拥有产品'),
sa.Column('c_name2', sa.String(length=255), nullable=True, comment='行业类名'),
sa.Column('c_type2', sa.Integer(), nullable=True, comment='行业类id'),
sa.Column('product_all2', sa.String(length=255), nullable=True, comment='公司拥有产品'),
sa.Column('f_name', sa.String(length=255), nullable=True, comment='父行业类名'),
sa.Column('f_type', sa.Integer(), nullable=True, comment='父行业类id'),
sa.Column('sxonhun', sa.String(length=32), nullable=True, comment='是否山西100强'),
sa.Column('scale', sa.String(length=32), nullable=True, comment='规模以上企业'),
sa.Column('serve', sa.String(length=32), nullable=True, comment='限额以上服务业'),
sa.PrimaryKeyConstraint('id'),
comment='全国企业表'
)
op.create_index(op.f('ix_enterprise111_c_type'), 'enterprise111', ['c_type'], unique=False)
op.create_index(op.f('ix_enterprise111_c_type1'), 'enterprise111', ['c_type1'], unique=False)
op.create_index(op.f('ix_enterprise111_c_type2'), 'enterprise111', ['c_type2'], unique=False)
op.create_index(op.f('ix_enterprise111_city'), 'enterprise111', ['city'], unique=False)
op.create_index(op.f('ix_enterprise111_company_id'), 'enterprise111', ['company_id'], unique=False)
op.create_index(op.f('ix_enterprise111_company_name'), 'enterprise111', ['company_name'], unique=False)
op.create_index(op.f('ix_enterprise111_district'), 'enterprise111', ['district'], unique=False)
op.create_index(op.f('ix_enterprise111_entypeid'), 'enterprise111', ['entypeid'], unique=False)
op.create_index(op.f('ix_enterprise111_f_type'), 'enterprise111', ['f_type'], unique=False)
op.create_index(op.f('ix_enterprise111_province'), 'enterprise111', ['province'], unique=False)
op.create_index(op.f('ix_enterprise111_public_id'), 'enterprise111', ['public_id'], unique=False)
op.create_index(op.f('ix_enterprise111_roundid'), 'enterprise111', ['roundid'], unique=False)
op.create_index(op.f('ix_enterprise111_scale_range'), 'enterprise111', ['scale_range'], unique=False)
op.create_index(op.f('ix_enterprise111_yearid'), 'enterprise111', ['yearid'], unique=False)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f('ix_enterprise111_yearid'), table_name='enterprise111')
op.drop_index(op.f('ix_enterprise111_scale_range'), table_name='enterprise111')
op.drop_index(op.f('ix_enterprise111_roundid'), table_name='enterprise111')
op.drop_index(op.f('ix_enterprise111_public_id'), table_name='enterprise111')
op.drop_index(op.f('ix_enterprise111_province'), table_name='enterprise111')
op.drop_index(op.f('ix_enterprise111_f_type'), table_name='enterprise111')
op.drop_index(op.f('ix_enterprise111_entypeid'), table_name='enterprise111')
op.drop_index(op.f('ix_enterprise111_district'), table_name='enterprise111')
op.drop_index(op.f('ix_enterprise111_company_name'), table_name='enterprise111')
op.drop_index(op.f('ix_enterprise111_company_id'), table_name='enterprise111')
op.drop_index(op.f('ix_enterprise111_city'), table_name='enterprise111')
op.drop_index(op.f('ix_enterprise111_c_type2'), table_name='enterprise111')
op.drop_index(op.f('ix_enterprise111_c_type1'), table_name='enterprise111')
op.drop_index(op.f('ix_enterprise111_c_type'), table_name='enterprise111')
op.drop_table('enterprise111')
# ### end Alembic commands ###
"""empty message
Revision ID: 6ab647f6d851
Revises: 1148aa49cc24
Create Date: 2023-02-23 16:29:42.838157
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '6ab647f6d851'
down_revision = '1148aa49cc24'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('customer_consultation', sa.Column('linkman', sa.String(length=20), nullable=True, comment='联系人'))
op.add_column('customer_consultation', sa.Column('link_mobile', sa.String(length=20), nullable=True, comment='联系方式'))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('customer_consultation', 'link_mobile')
op.drop_column('customer_consultation', 'linkman')
# ### end Alembic commands ###
"""empty message
Revision ID: 6af94c9dab96
Revises: 7647adcdc298
Create Date: 2022-11-22 16:13:20.690034
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '6af94c9dab96'
down_revision = '7647adcdc298'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('project_file', 'flag',
existing_type=mysql.INTEGER(display_width=11),
comment='2为对接库,3为签约库,4为开工库,其他5',
existing_comment='2为对接库,3为签约库,4为开工库',
existing_nullable=True)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('project_file', 'flag',
existing_type=mysql.INTEGER(display_width=11),
comment='2为对接库,3为签约库,4为开工库',
existing_comment='2为对接库,3为签约库,4为开工库,其他5',
existing_nullable=True)
# ### end Alembic commands ###
"""empty message
Revision ID: 6de45042c0d0
Revises: d40bf2ca852c
Create Date: 2023-01-10 15:19:14.981291
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '6de45042c0d0'
down_revision = 'd40bf2ca852c'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('industry_chain', 'icon_url',
existing_type=mysql.VARCHAR(length=255),
nullable=True,
existing_comment='未选中时行业图标')
op.alter_column('industry_chain', 'icon_url1',
existing_type=mysql.VARCHAR(length=255),
nullable=True,
existing_comment='选中时行业图标')
op.alter_column('industry_chain', 'status',
existing_type=mysql.INTEGER(display_width=11),
nullable=True,
existing_comment='启用状态1启用,2禁用')
op.alter_column('industry_chain', 'relate_id',
existing_type=mysql.INTEGER(display_width=11),
comment='关系id(关联与哪个产业环节',
existing_comment='关系id(关联于哪个产业环节的id)',
existing_nullable=True)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('industry_chain', 'relate_id',
existing_type=mysql.INTEGER(display_width=11),
comment='关系id(关联于哪个产业环节的id)',
existing_comment='关系id(关联与哪个产业环节',
existing_nullable=True)
op.alter_column('industry_chain', 'status',
existing_type=mysql.INTEGER(display_width=11),
nullable=False,
existing_comment='启用状态1启用,2禁用')
op.alter_column('industry_chain', 'icon_url1',
existing_type=mysql.VARCHAR(length=255),
nullable=False,
existing_comment='选中时行业图标')
op.alter_column('industry_chain', 'icon_url',
existing_type=mysql.VARCHAR(length=255),
nullable=False,
existing_comment='未选中时行业图标')
# ### end Alembic commands ###
"""empty message
Revision ID: 736c3275e5f3
Revises: b585af1123cc
Create Date: 2023-01-04 14:36:59.565644
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '736c3275e5f3'
down_revision = 'b585af1123cc'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('user', 'role_id')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('user', sa.Column('role_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='角色id '))
# ### end Alembic commands ###
"""empty message
Revision ID: 7647adcdc298
Revises: 2a39eca3d412
Create Date: 2022-11-22 11:55:26.663885
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '7647adcdc298'
down_revision = '2a39eca3d412'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('project_management', sa.Column('is_delete', sa.Integer(), nullable=True, comment='逻辑删除'))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('project_management', 'is_delete')
# ### end Alembic commands ###
"""empty message
Revision ID: 796079d17881
Revises: 19ac0d1f0f55
Create Date: 2023-02-03 10:23:52.903625
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '796079d17881'
down_revision = '19ac0d1f0f55'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('enterprise', sa.Column('industry_chain_id', sa.Integer(), nullable=True))
op.create_foreign_key(None, 'enterprise', 'industry_chain', ['industry_chain_id'], ['id'])
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint(None, 'enterprise', type_='foreignkey')
op.drop_column('enterprise', 'industry_chain_id')
# ### end Alembic commands ###
"""empty message
Revision ID: 7b3c7cc35c61
Revises: 10b496f3dd09
Create Date: 2022-11-24 20:17:13.925189
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '7b3c7cc35c61'
down_revision = '10b496f3dd09'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('jc_target',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('is_delete', sa.Integer(), nullable=True, comment='逻辑删除'),
sa.Column('year', sa.String(length=30), nullable=True, comment='数据年份'),
sa.Column('upload_time', sa.String(length=30), nullable=True, comment='上传日期'),
sa.Column('upload_unit', sa.String(length=30), nullable=True, comment='上传部门'),
sa.Column('upload_people', sa.String(length=30), nullable=True, comment='上传人'),
sa.Column('grade_sign', sa.Float(), nullable=True, comment='签约项目金额'),
sa.Column('grade_start', sa.Float(), nullable=True, comment='项目开工率'),
sa.Column('grade_plan_invest', sa.Float(), nullable=True, comment='新开工固定资产投资项目计划投资额'),
sa.Column('grade_arrive_target1', sa.Float(), nullable=True, comment='固定资产投资项目资金到位额'),
sa.Column('grade_arrive_target0', sa.Float(), nullable=True, comment='非固定资产投资项目资金到位额'),
sa.Column('district_name', sa.String(length=30), nullable=True, comment='区县名称'),
sa.Column('money_sign', sa.Float(), nullable=True, comment='签约项目金额'),
sa.Column('rate_start', sa.Float(), nullable=True, comment='项目开工率'),
sa.Column('money_plan_invest', sa.Float(), nullable=True, comment='新开工固定资产投资项目计划投资额'),
sa.Column('money_arrive_target1', sa.Float(), nullable=True, comment='固定资产投资项目资金到位额'),
sa.Column('money_arrive_target0', sa.Float(), nullable=True, comment='非固定资产投资项目资金到位额'),
sa.PrimaryKeyConstraint('id'),
comment='项目化管理-晋城市县(市、区)、开发区指标表'
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('jc_target')
# ### end Alembic commands ###
"""empty message
Revision ID: 7c65fe37c77f
Revises: 567fa4c5fc84
Create Date: 2022-11-17 10:40:03.957755
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '7c65fe37c77f'
down_revision = '567fa4c5fc84'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('sign_three',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('name', sa.String(length=20), nullable=True, comment='第三方名称'),
sa.Column('people', sa.String(length=20), nullable=True, comment='第三方联系人'),
sa.Column('mobile', sa.String(length=20), nullable=True, comment='第三方联系方式'),
sa.Column('project_id', sa.Integer(), nullable=True, comment='外键id,项目id'),
sa.ForeignKeyConstraint(['project_id'], ['siku_project.id'], ),
sa.PrimaryKeyConstraint('id'),
comment='签约库-签约的第三方'
)
op.add_column('project_file', sa.Column('upload_time', sa.String(length=20), nullable=True, comment='上传时间'))
op.add_column('project_file', sa.Column('upload_people', sa.String(length=20), nullable=True, comment='上传人'))
op.add_column('project_file', sa.Column('upload_people_id', sa.Integer(), nullable=True, comment='上传人id'))
op.add_column('siku_project', sa.Column('sign_style', sa.String(length=20), nullable=True, comment='签约方式'))
op.add_column('siku_project', sa.Column('sign_explain', sa.String(length=255), nullable=True, comment='其他签约说明'))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('siku_project', 'sign_explain')
op.drop_column('siku_project', 'sign_style')
op.drop_column('project_file', 'upload_people_id')
op.drop_column('project_file', 'upload_people')
op.drop_column('project_file', 'upload_time')
op.drop_table('sign_three')
# ### end Alembic commands ###
"""empty message
Revision ID: 7e6423c3625b
Revises: 0a26b9ded8ca
Create Date: 2023-02-14 11:53:58.733031
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '7e6423c3625b'
down_revision = '0a26b9ded8ca'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('enterprise', sa.Column('c_name1', sa.String(length=255), nullable=True, comment='行业类名'))
op.add_column('enterprise', sa.Column('c_type1', sa.Integer(), nullable=True, comment='行业类id'))
op.add_column('enterprise', sa.Column('product_all1', sa.String(length=255), nullable=True, comment='公司拥有产品'))
op.add_column('enterprise', sa.Column('c_name2', sa.String(length=255), nullable=True, comment='行业类名'))
op.add_column('enterprise', sa.Column('c_type2', sa.Integer(), nullable=True, comment='行业类id'))
op.add_column('enterprise', sa.Column('product_all2', sa.String(length=255), nullable=True, comment='公司拥有产品'))
op.create_index(op.f('ix_enterprise_c_type1'), 'enterprise', ['c_type1'], unique=False)
op.create_index(op.f('ix_enterprise_c_type2'), 'enterprise', ['c_type2'], unique=False)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f('ix_enterprise_c_type2'), table_name='enterprise')
op.drop_index(op.f('ix_enterprise_c_type1'), table_name='enterprise')
op.drop_column('enterprise', 'product_all2')
op.drop_column('enterprise', 'c_type2')
op.drop_column('enterprise', 'c_name2')
op.drop_column('enterprise', 'product_all1')
op.drop_column('enterprise', 'c_type1')
op.drop_column('enterprise', 'c_name1')
# ### end Alembic commands ###
"""empty message
Revision ID: 8046440f2a2d
Revises: e361ab017b2b
Create Date: 2023-02-22 13:53:00.731914
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '8046440f2a2d'
down_revision = 'e361ab017b2b'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('zaiti_build', sa.Column('build_name', sa.String(length=20), nullable=True, comment='楼宇名称'))
op.add_column('zaiti_build', sa.Column('audit_status', sa.Integer(), nullable=True, comment='审核状态 0为未审核;1为审核通过;2为提交;3为驳回;4未通过'))
op.add_column('zaiti_build', sa.Column('audit_message', sa.String(length=50), nullable=True, comment='审核附言'))
op.add_column('zaiti_build', sa.Column('upload_people', sa.String(length=20), nullable=True, comment='数据上传人'))
op.add_column('zaiti_build', sa.Column('upload_people_id', sa.String(length=20), nullable=True, comment='数据上传人用户id'))
op.add_column('zaiti_build', sa.Column('upload_people_role_id', sa.String(length=20), nullable=True, comment='数据上传人权限id'))
op.add_column('zaiti_build', sa.Column('upload_people_belong', sa.String(length=100), nullable=True, comment='数据上传人所属区县、机构、部门'))
op.add_column('zaiti_build', sa.Column('fix_time', sa.DateTime(), nullable=True, comment='数据修改时间'))
op.add_column('zaiti_build', sa.Column('fix_people', sa.String(length=20), nullable=True, comment='数据修改人'))
op.add_column('zaiti_build', sa.Column('district_name', sa.String(length=50), nullable=True, comment='所属县区'))
op.add_column('zaiti_build', sa.Column('detail_address', sa.String(length=20), nullable=True, comment='详细地址(地址需填写准确、详细、精准)'))
op.add_column('zaiti_build', sa.Column('construction_time', sa.String(length=20), nullable=True, comment='建成时间(年)'))
op.add_column('zaiti_build', sa.Column('cover_land_area', sa.String(length=10), nullable=True, comment='总占地面积(㎡)'))
op.add_column('zaiti_build', sa.Column('car_space_num', sa.Integer(), nullable=True, comment='车位(个)'))
op.add_column('zaiti_build', sa.Column('lift_num', sa.Integer(), nullable=True, comment='电梯(部)'))
op.add_column('zaiti_build', sa.Column('attract_status', sa.String(length=20), nullable=True, comment='拟招引产业'))
op.add_column('zaiti_build', sa.Column('rent_money', sa.String(length=20), nullable=True, comment='租金(元/平米/天)'))
op.add_column('zaiti_build', sa.Column('wuye_money', sa.String(length=20), nullable=True, comment='物业费(元/平米/月)'))
op.add_column('zaiti_build', sa.Column('link_mobile', sa.String(length=20), nullable=True, comment='联系方式'))
op.drop_column('zaiti_build', 'land_area')
op.drop_column('zaiti_build', 'carport')
op.drop_column('zaiti_build', 'property_fee')
op.drop_column('zaiti_build', 'attract_industry')
op.drop_column('zaiti_build', 'rent')
op.drop_column('zaiti_build', 'address')
op.drop_column('zaiti_build', 'build_time')
op.drop_column('zaiti_build', 'district')
op.drop_column('zaiti_build', 'telephone')
op.drop_column('zaiti_build', 'name')
op.drop_column('zaiti_build', 'elevator')
op.add_column('zaiti_factory', sa.Column('factory_name', sa.String(length=20), nullable=True, comment='厂房名称'))
op.add_column('zaiti_factory', sa.Column('district_name', sa.String(length=50), nullable=True, comment='所属县区'))
op.add_column('zaiti_factory', sa.Column('build_type', sa.String(length=20), nullable=True, comment='厂房类型(单层/多层/混合层)'))
op.add_column('zaiti_factory', sa.Column('detail_address', sa.String(length=50), nullable=True, comment='详细地址(地址需填写准确、详细、精准)'))
op.add_column('zaiti_factory', sa.Column('construction_time', sa.String(length=20), nullable=True, comment='建成时间(年)'))
op.add_column('zaiti_factory', sa.Column('cover_land_area', sa.String(length=20), nullable=True, comment='总占地面积(㎡)'))
op.add_column('zaiti_factory', sa.Column('factory_area', sa.String(length=255), nullable=True, comment='总建筑面积(㎡)'))
op.add_column('zaiti_factory', sa.Column('is_network', sa.String(length=20), nullable=True, comment='是否已通网络(是/否)'))
op.add_column('zaiti_factory', sa.Column('lift_num', sa.String(length=20), nullable=True, comment='电梯(部)'))
op.add_column('zaiti_factory', sa.Column('attract_status', sa.String(length=20), nullable=True, comment='拟招引产业(下拉筛选)'))
op.add_column('zaiti_factory', sa.Column('rent_money', sa.String(length=20), nullable=True, comment='租金(元/平米/天)'))
op.add_column('zaiti_factory', sa.Column('link_mobile', sa.String(length=20), nullable=True, comment='联系方式'))
op.add_column('zaiti_factory', sa.Column('price_url', sa.String(length=255), nullable=True, comment='厂房图片url'))
op.add_column('zaiti_factory', sa.Column('upload_time', sa.DateTime(), nullable=True, comment='数据上传时间'))
op.add_column('zaiti_factory', sa.Column('upload_people', sa.String(length=20), nullable=True, comment='数据上传人名字'))
op.add_column('zaiti_factory', sa.Column('upload_people_id', sa.String(length=20), nullable=True, comment='数据上传人用户id'))
op.add_column('zaiti_factory', sa.Column('upload_people_role_id', sa.String(length=20), nullable=True, comment='数据上传人权限id'))
op.add_column('zaiti_factory', sa.Column('upload_people_belong', sa.String(length=100), nullable=True, comment='数据上传人所属区县、机构、部门'))
op.add_column('zaiti_factory', sa.Column('fix_time', sa.DateTime(), nullable=True, comment='数据修改时间'))
op.add_column('zaiti_factory', sa.Column('fix_people', sa.String(length=20), nullable=True, comment='数据修改人名字'))
op.add_column('zaiti_factory', sa.Column('audit_status', sa.String(length=20), nullable=True, comment='审核状态 0为未审核;1为审核通过;2为提交;3为驳回;4未通过;'))
op.add_column('zaiti_factory', sa.Column('audit_message', sa.String(length=50), nullable=True, comment='审核附言'))
op.drop_column('zaiti_factory', 'land_area')
op.drop_column('zaiti_factory', 'buide_type')
op.drop_column('zaiti_factory', 'attract_industry')
op.drop_column('zaiti_factory', 'rent')
op.drop_column('zaiti_factory', 'address')
op.drop_column('zaiti_factory', 'build_time')
op.drop_column('zaiti_factory', 'factory_pic')
op.drop_column('zaiti_factory', 'build_area')
op.drop_column('zaiti_factory', 'district')
op.drop_column('zaiti_factory', 'is_internet')
op.drop_column('zaiti_factory', 'telephone')
op.drop_column('zaiti_factory', 'name')
op.drop_column('zaiti_factory', 'elevator')
op.add_column('zaiti_land', sa.Column('land_name', sa.String(length=20), nullable=True, comment='土地名称'))
op.add_column('zaiti_land', sa.Column('upload_time', sa.DateTime(), nullable=True, comment='数据上传时间'))
op.add_column('zaiti_land', sa.Column('upload_people', sa.String(length=20), nullable=True, comment='数据上传人名字'))
op.add_column('zaiti_land', sa.Column('upload_people_id', sa.String(length=20), nullable=True, comment='数据上传人用户id'))
op.add_column('zaiti_land', sa.Column('upload_people_role_id', sa.String(length=20), nullable=True, comment='数据上传人权限id'))
op.add_column('zaiti_land', sa.Column('upload_people_belong', sa.String(length=100), nullable=True, comment='数据上传人所属区县、机构、部门'))
op.add_column('zaiti_land', sa.Column('fix_time', sa.DateTime(), nullable=True, comment='数据修改时间'))
op.add_column('zaiti_land', sa.Column('fix_people', sa.String(length=20), nullable=True, comment='数据修改人名字'))
op.add_column('zaiti_land', sa.Column('audit_status', sa.Integer(), nullable=True, comment='审核状态 0为未审核;1为审核通过;2为提交;3为驳回;4未通过'))
op.add_column('zaiti_land', sa.Column('audit_message', sa.String(length=50), nullable=True, comment='审核附言'))
op.add_column('zaiti_land', sa.Column('land_code', sa.String(length=20), nullable=True, comment='土地编码'))
op.add_column('zaiti_land', sa.Column('district_name', sa.String(length=50), nullable=True, comment='所属县区'))
op.add_column('zaiti_land', sa.Column('land_nature', sa.String(length=20), nullable=True, comment='用地性质(工业用地/商服用地/物流仓储用地/科研用地/居住用地)(包括用地性质类别代码)'))
op.add_column('zaiti_land', sa.Column('total_area', sa.String(length=255), nullable=True, comment='用地面积(净用地面积)(公顷)'))
op.drop_column('zaiti_land', 'nature')
op.drop_column('zaiti_land', 'area')
op.drop_column('zaiti_land', 'code')
op.drop_column('zaiti_land', 'district')
op.drop_column('zaiti_land', 'name')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('zaiti_land', sa.Column('name', mysql.VARCHAR(length=20), nullable=True, comment='土地名称'))
op.add_column('zaiti_land', sa.Column('district', mysql.VARCHAR(length=50), nullable=True, comment='所属县区'))
op.add_column('zaiti_land', sa.Column('code', mysql.VARCHAR(length=20), nullable=True, comment='土地编码'))
op.add_column('zaiti_land', sa.Column('area', mysql.VARCHAR(length=255), nullable=True, comment='用地面积(净用地面积)(公顷)'))
op.add_column('zaiti_land', sa.Column('nature', mysql.VARCHAR(length=20), nullable=True, comment='用地性质(工业用地/商服用地/物流仓储用地/科研用地/居住用地)(包括用地性质类别代码)'))
op.drop_column('zaiti_land', 'total_area')
op.drop_column('zaiti_land', 'land_nature')
op.drop_column('zaiti_land', 'district_name')
op.drop_column('zaiti_land', 'land_code')
op.drop_column('zaiti_land', 'audit_message')
op.drop_column('zaiti_land', 'audit_status')
op.drop_column('zaiti_land', 'fix_people')
op.drop_column('zaiti_land', 'fix_time')
op.drop_column('zaiti_land', 'upload_people_belong')
op.drop_column('zaiti_land', 'upload_people_role_id')
op.drop_column('zaiti_land', 'upload_people_id')
op.drop_column('zaiti_land', 'upload_people')
op.drop_column('zaiti_land', 'upload_time')
op.drop_column('zaiti_land', 'land_name')
op.add_column('zaiti_factory', sa.Column('elevator', mysql.VARCHAR(length=20), nullable=True, comment='电梯(部)'))
op.add_column('zaiti_factory', sa.Column('name', mysql.VARCHAR(length=20), nullable=True, comment='厂房名称'))
op.add_column('zaiti_factory', sa.Column('telephone', mysql.VARCHAR(length=20), nullable=True, comment='联系方式'))
op.add_column('zaiti_factory', sa.Column('is_internet', mysql.VARCHAR(length=20), nullable=True, comment='是否已通网络(是/否)'))
op.add_column('zaiti_factory', sa.Column('district', mysql.VARCHAR(length=50), nullable=True, comment='所属县区'))
op.add_column('zaiti_factory', sa.Column('build_area', mysql.VARCHAR(length=255), nullable=True, comment='总建筑面积(㎡)'))
op.add_column('zaiti_factory', sa.Column('factory_pic', mysql.VARCHAR(length=20), nullable=True, comment='厂房图片'))
op.add_column('zaiti_factory', sa.Column('build_time', mysql.VARCHAR(length=20), nullable=True, comment='建成时间(年)'))
op.add_column('zaiti_factory', sa.Column('address', mysql.VARCHAR(length=50), nullable=True, comment='详细地址(地址需填写准确、详细、精准)'))
op.add_column('zaiti_factory', sa.Column('rent', mysql.VARCHAR(length=20), nullable=True, comment='租金(元/平米/天)'))
op.add_column('zaiti_factory', sa.Column('attract_industry', mysql.VARCHAR(length=20), nullable=True, comment='拟招引产业(下拉筛选)'))
op.add_column('zaiti_factory', sa.Column('buide_type', mysql.VARCHAR(length=20), nullable=True, comment='厂房类型(单层/多层/混合层)'))
op.add_column('zaiti_factory', sa.Column('land_area', mysql.VARCHAR(length=20), nullable=True, comment='总占地面积(㎡)'))
op.drop_column('zaiti_factory', 'audit_message')
op.drop_column('zaiti_factory', 'audit_status')
op.drop_column('zaiti_factory', 'fix_people')
op.drop_column('zaiti_factory', 'fix_time')
op.drop_column('zaiti_factory', 'upload_people_belong')
op.drop_column('zaiti_factory', 'upload_people_role_id')
op.drop_column('zaiti_factory', 'upload_people_id')
op.drop_column('zaiti_factory', 'upload_people')
op.drop_column('zaiti_factory', 'upload_time')
op.drop_column('zaiti_factory', 'price_url')
op.drop_column('zaiti_factory', 'link_mobile')
op.drop_column('zaiti_factory', 'rent_money')
op.drop_column('zaiti_factory', 'attract_status')
op.drop_column('zaiti_factory', 'lift_num')
op.drop_column('zaiti_factory', 'is_network')
op.drop_column('zaiti_factory', 'factory_area')
op.drop_column('zaiti_factory', 'cover_land_area')
op.drop_column('zaiti_factory', 'construction_time')
op.drop_column('zaiti_factory', 'detail_address')
op.drop_column('zaiti_factory', 'build_type')
op.drop_column('zaiti_factory', 'district_name')
op.drop_column('zaiti_factory', 'factory_name')
op.add_column('zaiti_build', sa.Column('elevator', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='电梯(部)'))
op.add_column('zaiti_build', sa.Column('name', mysql.VARCHAR(length=20), nullable=True, comment='楼宇名称'))
op.add_column('zaiti_build', sa.Column('telephone', mysql.VARCHAR(length=20), nullable=True, comment='联系方式'))
op.add_column('zaiti_build', sa.Column('district', mysql.VARCHAR(length=50), nullable=True, comment='所属县区'))
op.add_column('zaiti_build', sa.Column('build_time', mysql.VARCHAR(length=20), nullable=True, comment='建成时间(年)'))
op.add_column('zaiti_build', sa.Column('address', mysql.VARCHAR(length=20), nullable=True, comment='详细地址(地址需填写准确、详细、精准)'))
op.add_column('zaiti_build', sa.Column('rent', mysql.VARCHAR(length=20), nullable=True, comment='租金(元/平米/天)'))
op.add_column('zaiti_build', sa.Column('attract_industry', mysql.VARCHAR(length=20), nullable=True, comment='拟招引产业'))
op.add_column('zaiti_build', sa.Column('property_fee', mysql.VARCHAR(length=20), nullable=True, comment='物业费(元/平米/月)'))
op.add_column('zaiti_build', sa.Column('carport', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='车位(个)'))
op.add_column('zaiti_build', sa.Column('land_area', mysql.VARCHAR(length=10), nullable=True, comment='总占地面积(㎡)'))
op.drop_column('zaiti_build', 'link_mobile')
op.drop_column('zaiti_build', 'wuye_money')
op.drop_column('zaiti_build', 'rent_money')
op.drop_column('zaiti_build', 'attract_status')
op.drop_column('zaiti_build', 'lift_num')
op.drop_column('zaiti_build', 'car_space_num')
op.drop_column('zaiti_build', 'cover_land_area')
op.drop_column('zaiti_build', 'construction_time')
op.drop_column('zaiti_build', 'detail_address')
op.drop_column('zaiti_build', 'district_name')
op.drop_column('zaiti_build', 'fix_people')
op.drop_column('zaiti_build', 'fix_time')
op.drop_column('zaiti_build', 'upload_people_belong')
op.drop_column('zaiti_build', 'upload_people_role_id')
op.drop_column('zaiti_build', 'upload_people_id')
op.drop_column('zaiti_build', 'upload_people')
op.drop_column('zaiti_build', 'audit_message')
op.drop_column('zaiti_build', 'audit_status')
op.drop_column('zaiti_build', 'build_name')
# ### end Alembic commands ###
"""create table
Revision ID: 842339173242
Revises: f9b8176a53e7
Create Date: 2021-12-07 16:01:15.267248
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '842339173242'
down_revision = 'f9b8176a53e7'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table_comment(
'induzone',
'晋城园区信息表',
existing_comment='晋城园区信息',
schema=None
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table_comment(
'induzone',
'晋城园区信息',
existing_comment='晋城园区信息表',
schema=None
)
# ### end Alembic commands ###
"""empty message
Revision ID: 86c28972faba
Revises: cd765f81acd4
Create Date: 2023-03-10 17:59:38.530974
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '86c28972faba'
down_revision = 'cd765f81acd4'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('enterprise_punish', 'id',
existing_type=mysql.INTEGER(display_width=11),
comment='信息主键id',
existing_comment='专利信息主键id',
existing_nullable=False,
autoincrement=True)
op.alter_column('enterprise_punish', 'pub_date',
existing_type=mysql.VARCHAR(length=32),
comment='处罚日期',
existing_comment='公开日期',
existing_nullable=True)
op.alter_column('enterprise_punish', 'punish_no',
existing_type=mysql.VARCHAR(length=32),
comment='决定文书号',
existing_comment='处罚日期',
existing_nullable=True)
op.alter_column('enterprise_punish', 'punish_reason',
existing_type=mysql.VARCHAR(length=32),
comment='处罚事由',
existing_comment='决定文书号',
existing_nullable=True)
op.alter_column('enterprise_punish', 'punish_content',
existing_type=mysql.VARCHAR(length=32),
comment='处罚结果/内容',
existing_comment='处罚事由/违法行为类型',
existing_nullable=True)
op.alter_column('enterprise_punish', 'punish_org',
existing_type=mysql.VARCHAR(length=32),
comment='处罚单位',
existing_comment='处罚结果/内容',
existing_nullable=True)
op.alter_column('enterprise_punish', 'sources',
existing_type=mysql.VARCHAR(length=32),
comment='来源',
existing_comment='处罚单位',
existing_nullable=True)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('enterprise_punish', 'sources',
existing_type=mysql.VARCHAR(length=32),
comment='处罚单位',
existing_comment='来源',
existing_nullable=True)
op.alter_column('enterprise_punish', 'punish_org',
existing_type=mysql.VARCHAR(length=32),
comment='处罚结果/内容',
existing_comment='处罚单位',
existing_nullable=True)
op.alter_column('enterprise_punish', 'punish_content',
existing_type=mysql.VARCHAR(length=32),
comment='处罚事由/违法行为类型',
existing_comment='处罚结果/内容',
existing_nullable=True)
op.alter_column('enterprise_punish', 'punish_reason',
existing_type=mysql.VARCHAR(length=32),
comment='决定文书号',
existing_comment='处罚事由',
existing_nullable=True)
op.alter_column('enterprise_punish', 'punish_no',
existing_type=mysql.VARCHAR(length=32),
comment='处罚日期',
existing_comment='决定文书号',
existing_nullable=True)
op.alter_column('enterprise_punish', 'pub_date',
existing_type=mysql.VARCHAR(length=32),
comment='公开日期',
existing_comment='处罚日期',
existing_nullable=True)
op.alter_column('enterprise_punish', 'id',
existing_type=mysql.INTEGER(display_width=11),
comment='专利信息主键id',
existing_comment='信息主键id',
existing_nullable=False,
autoincrement=True)
# ### end Alembic commands ###
"""empty message
Revision ID: 86cebc03f6ec
Revises: c40a14ba57b8
Create Date: 2022-11-28 10:56:00.165149
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '86cebc03f6ec'
down_revision = 'c40a14ba57b8'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('money_arrive', sa.Column('file_name', sa.String(length=30), nullable=True, comment='文件名称'))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('money_arrive', 'file_name')
# ### end Alembic commands ###
"""empty message
Revision ID: 86f617b5d0c7
Revises: 41f4a2368801
Create Date: 2022-11-11 11:51:08.013565
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '86f617b5d0c7'
down_revision = '41f4a2368801'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('siku_project', sa.Column('is_delete', sa.Integer(), nullable=True, comment='逻辑删除 1是0否'))
op.add_column('siku_project', sa.Column('project_to_area', sa.String(length=20), nullable=True, comment='拟落地区域'))
op.add_column('siku_project', sa.Column('development_area', sa.String(length=20), nullable=True, comment='开发区'))
op.add_column('siku_project', sa.Column('project_address', sa.String(length=20), nullable=True, comment='项目详细地址'))
op.add_column('siku_project', sa.Column('joint_condition', sa.String(length=20), nullable=True, comment='项目对接情况'))
op.add_column('siku_project', sa.Column('project_problem', sa.String(length=20), nullable=True, comment='项目当前存在的问题'))
op.add_column('siku_project', sa.Column('project_stalker', sa.String(length=20), nullable=True, comment='项目跟踪人'))
op.add_column('siku_project', sa.Column('joint_person', sa.String(length=20), nullable=True, comment='对接人'))
op.add_column('siku_project', sa.Column('joint_person_unity', sa.String(length=20), nullable=True, comment='对接人单位及职务'))
op.add_column('siku_project', sa.Column('joint_person_mobile', sa.String(length=20), nullable=True, comment='对接人联系方式'))
op.add_column('siku_project', sa.Column('project_people', sa.String(length=30), nullable=True, comment='项目方联系人'))
op.add_column('siku_project', sa.Column('project_people_unity', sa.String(length=30), nullable=True, comment='项目方单位或职务'))
op.add_column('siku_project', sa.Column('project_people_mobile', sa.String(length=30), nullable=True, comment='项目方联系方式'))
op.add_column('siku_project', sa.Column('attract_name', sa.String(length=30), nullable=True, comment='引资方名称'))
op.add_column('siku_project', sa.Column('progress_condition', sa.String(length=20), nullable=True, comment='项目推进情况'))
op.add_column('siku_project', sa.Column('Party_A_name', sa.String(length=20), nullable=True, comment='签约甲方名称'))
op.add_column('siku_project', sa.Column('Party_A_people', sa.String(length=20), nullable=True, comment='签约甲方联系人'))
op.add_column('siku_project', sa.Column('Party_A_mobile', sa.String(length=20), nullable=True, comment='签约甲方联系方式'))
op.add_column('siku_project', sa.Column('Party_B_name', sa.String(length=20), nullable=True, comment='签约乙方名称'))
op.add_column('siku_project', sa.Column('Party_B_people', sa.String(length=20), nullable=True, comment='签约乙方联系人'))
op.add_column('siku_project', sa.Column('Party_B_mobile', sa.String(length=20), nullable=True, comment='签约乙方联系方式'))
op.add_column('siku_project', sa.Column('sign_time', sa.DateTime(), nullable=True, comment='签约时间'))
op.add_column('siku_project', sa.Column('investment', sa.String(length=20), nullable=True, comment='到位资金'))
op.add_column('siku_project', sa.Column('project_to_area1', sa.String(length=20), nullable=True, comment='落地区域'))
op.add_column('siku_project', sa.Column('start_time', sa.DateTime(), nullable=True, comment='开工时间'))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('siku_project', 'start_time')
op.drop_column('siku_project', 'project_to_area1')
op.drop_column('siku_project', 'investment')
op.drop_column('siku_project', 'sign_time')
op.drop_column('siku_project', 'Party_B_mobile')
op.drop_column('siku_project', 'Party_B_people')
op.drop_column('siku_project', 'Party_B_name')
op.drop_column('siku_project', 'Party_A_mobile')
op.drop_column('siku_project', 'Party_A_people')
op.drop_column('siku_project', 'Party_A_name')
op.drop_column('siku_project', 'progress_condition')
op.drop_column('siku_project', 'attract_name')
op.drop_column('siku_project', 'project_people_mobile')
op.drop_column('siku_project', 'project_people_unity')
op.drop_column('siku_project', 'project_people')
op.drop_column('siku_project', 'joint_person_mobile')
op.drop_column('siku_project', 'joint_person_unity')
op.drop_column('siku_project', 'joint_person')
op.drop_column('siku_project', 'project_stalker')
op.drop_column('siku_project', 'project_problem')
op.drop_column('siku_project', 'joint_condition')
op.drop_column('siku_project', 'project_address')
op.drop_column('siku_project', 'development_area')
op.drop_column('siku_project', 'project_to_area')
op.drop_column('siku_project', 'is_delete')
# ### end Alembic commands ###
"""empty message
Revision ID: 87819a1875a3
Revises: 8b6061dfb1b3
Create Date: 2023-01-04 15:53:27.713413
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '87819a1875a3'
down_revision = '8b6061dfb1b3'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('user', 'is_delete')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('user', sa.Column('is_delete', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='逻辑删除 1是0否'))
# ### end Alembic commands ###
"""empty message
Revision ID: 8805cd14ed4c
Revises: 1b90a0436228
Create Date: 2023-02-02 16:35:10.627449
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '8805cd14ed4c'
down_revision = '1b90a0436228'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('enterprise', 'sxonhun',
existing_type=mysql.VARCHAR(length=32),
comment='是否山西100强',
existing_nullable=True)
op.alter_column('enterprise', 'scale',
existing_type=mysql.VARCHAR(length=32),
comment='规模以上企业',
existing_nullable=True)
op.alter_column('enterprise', 'serve',
existing_type=mysql.VARCHAR(length=32),
comment='限额以上服务业',
existing_nullable=True)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('enterprise', 'serve',
existing_type=mysql.VARCHAR(length=32),
comment=None,
existing_comment='限额以上服务业',
existing_nullable=True)
op.alter_column('enterprise', 'scale',
existing_type=mysql.VARCHAR(length=32),
comment=None,
existing_comment='规模以上企业',
existing_nullable=True)
op.alter_column('enterprise', 'sxonhun',
existing_type=mysql.VARCHAR(length=32),
comment=None,
existing_comment='是否山西100强',
existing_nullable=True)
# ### end Alembic commands ###
"""empty message
Revision ID: 8b6061dfb1b3
Revises: 736c3275e5f3
Create Date: 2023-01-04 15:41:40.108911
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '8b6061dfb1b3'
down_revision = '736c3275e5f3'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('user', sa.Column('is_delete', sa.Integer(), nullable=True, comment='逻辑删除 1是0否'))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('user', 'is_delete')
# ### end Alembic commands ###
"""empty message
Revision ID: 8ba3c2cfae73
Revises: 7e6423c3625b
Create Date: 2023-02-15 18:31:41.928731
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '8ba3c2cfae73'
down_revision = '7e6423c3625b'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('induzone', sa.Column('xiaqu_area', sa.Float(), nullable=True, comment='辖区面积(平方公里)'))
op.add_column('induzone', sa.Column('people_num', sa.Float(), nullable=True, comment='人口'))
op.add_column('induzone', sa.Column('carrier_form', sa.String(length=30), nullable=True, comment='载体形态'))
op.add_column('induzone', sa.Column('area_structure', sa.Float(), nullable=True, comment='辖区面积(平方公里)'))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('induzone', 'area_structure')
op.drop_column('induzone', 'carrier_form')
op.drop_column('induzone', 'people_num')
op.drop_column('induzone', 'xiaqu_area')
# ### end Alembic commands ###
"""empty message
Revision ID: 92105a57ac34
Revises: 031a5f982fc2
Create Date: 2023-09-25 10:19:14.198953
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '92105a57ac34'
down_revision = '031a5f982fc2'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('examine', sa.Column('time', sa.String(length=30), nullable=True, comment='标题的时间'))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('examine', 'time')
# ### end Alembic commands ###
"""empty message
Revision ID: 9389167fc068
Revises: d074791595d8
Create Date: 2023-04-12 16:38:11.380389
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '9389167fc068'
down_revision = 'd074791595d8'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('induzone', sa.Column('admin_live_water1', sa.String(length=255), nullable=True, comment='行政区-居民生活用水(元/立方米)'))
op.add_column('induzone', sa.Column('admin_live_water2', sa.String(length=255), nullable=True, comment='行政区-非居民用水(元/立方米)'))
op.add_column('induzone', sa.Column('admin_live_water3', sa.String(length=255), nullable=True, comment='行政区-特种用水(元/立方米)'))
op.add_column('induzone', sa.Column('admin_electric1', sa.String(length=255), nullable=True, comment='行政区-居民生活电价'))
op.add_column('induzone', sa.Column('admin_electric2', sa.String(length=255), nullable=True, comment='行政区-商业电价'))
op.add_column('induzone', sa.Column('admin_electric3', sa.String(length=255), nullable=True, comment='行政区-工业电价'))
op.add_column('induzone', sa.Column('admin_gas1', sa.String(length=255), nullable=True, comment='行政区-城市居民用气(元/立方米)'))
op.add_column('induzone', sa.Column('admin_gas2', sa.String(length=255), nullable=True, comment='行政区-工商业用气(元/立方米)'))
op.add_column('induzone', sa.Column('admin_residence1', sa.String(length=255), nullable=True, comment='行政区-居民住宅(元/平方米)'))
op.add_column('induzone', sa.Column('admin_residence2', sa.String(length=255), nullable=True, comment='行政区-非居民住宅(元/平方米)'))
op.add_column('induzone', sa.Column('admin_tax_rate', sa.String(length=255), nullable=True, comment='行政区-企业职工各种费率(人社局)'))
op.add_column('induzone', sa.Column('admin_wage_level', sa.String(length=255), nullable=True, comment='行政区-工资标准(人社局)'))
op.add_column('induzone', sa.Column('zone_status', sa.String(length=255), nullable=True, comment='产业园区-载体形态(楼宇/厂房)'))
op.add_column('induzone', sa.Column('zone_land_area', sa.String(length=255), nullable=True, comment='产业园区-占地面积(平方公里)'))
op.add_column('induzone', sa.Column('zone_structure_area', sa.String(length=255), nullable=True, comment='产业园区-建筑面积(平方公里)'))
op.add_column('induzone', sa.Column('zone_linkman', sa.String(length=255), nullable=True, comment='产业园区-联系人(招商负责人)'))
op.add_column('induzone', sa.Column('zone_mobile', sa.String(length=255), nullable=True, comment='产业园区-联系方式(招商负责人)'))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('induzone', 'zone_mobile')
op.drop_column('induzone', 'zone_linkman')
op.drop_column('induzone', 'zone_structure_area')
op.drop_column('induzone', 'zone_land_area')
op.drop_column('induzone', 'zone_status')
op.drop_column('induzone', 'admin_wage_level')
op.drop_column('induzone', 'admin_tax_rate')
op.drop_column('induzone', 'admin_residence2')
op.drop_column('induzone', 'admin_residence1')
op.drop_column('induzone', 'admin_gas2')
op.drop_column('induzone', 'admin_gas1')
op.drop_column('induzone', 'admin_electric3')
op.drop_column('induzone', 'admin_electric2')
op.drop_column('induzone', 'admin_electric1')
op.drop_column('induzone', 'admin_live_water3')
op.drop_column('induzone', 'admin_live_water2')
op.drop_column('induzone', 'admin_live_water1')
# ### end Alembic commands ###
"""empty message
Revision ID: 972efac77f90
Revises: e460c1f0a941
Create Date: 2023-02-24 16:57:51.656875
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '972efac77f90'
down_revision = 'e460c1f0a941'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint('enterprise_ibfk_1', 'enterprise', type_='foreignkey')
op.drop_column('enterprise', 'industry_chain_id')
op.alter_column('introduction_meet', 'flag',
existing_type=mysql.INTEGER(display_width=11),
comment='推介会类型 1往期,2即将举办',
existing_comment='推介会类型',
existing_nullable=True)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('introduction_meet', 'flag',
existing_type=mysql.INTEGER(display_width=11),
comment='推介会类型',
existing_comment='推介会类型 1往期,2即将举办',
existing_nullable=True)
op.add_column('enterprise', sa.Column('industry_chain_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True))
op.create_foreign_key('enterprise_ibfk_1', 'enterprise', 'industry_chain', ['industry_chain_id'], ['id'])
# ### end Alembic commands ###
"""empty message
Revision ID: 99e2ef03b89c
Revises: d6c81d2c0cdd
Create Date: 2022-12-09 15:12:24.958179
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '99e2ef03b89c'
down_revision = 'd6c81d2c0cdd'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('industry_chain',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('industry_name', sa.String(length=20), nullable=True, comment='行业名称'),
sa.Column('industry_type', sa.Integer(), nullable=True, comment='行业类型(0是产业集群,1是上游行业,2是中游行业,3是下游行业)'),
sa.Column('relate_id', sa.Integer(), nullable=True, comment='关系id(关联与哪个产业环节'),
sa.PrimaryKeyConstraint('id'),
comment='新版产业链数据数据表'
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('industry_chain')
# ### end Alembic commands ###
"""empty message
Revision ID: 9ef30d50f9e0
Revises: 87819a1875a3
Create Date: 2023-01-05 11:46:45.226510
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '9ef30d50f9e0'
down_revision = '87819a1875a3'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('industry_chain', sa.Column('status', sa.Integer(), nullable=True, comment='启用状态1启用,2禁用'))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('industry_chain', 'status')
# ### end Alembic commands ###
"""empty message
Revision ID: a2a846da1ccd
Revises: 3913b03bf96a
Create Date: 2023-02-26 10:42:03.516467
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'a2a846da1ccd'
down_revision = '3913b03bf96a'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('customer_consultation', sa.Column('consultation_time', sa.DateTime(), nullable=True, comment='咨询时间'))
op.add_column('customer_consultation', sa.Column('reply_time', sa.DateTime(), nullable=True, comment='回复时间'))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('customer_consultation', 'reply_time')
op.drop_column('customer_consultation', 'consultation_time')
# ### end Alembic commands ###
"""empty message
Revision ID: a6d8985e12da
Revises: 408eefbb94e1
Create Date: 2023-03-08 16:02:18.691482
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = 'a6d8985e12da'
down_revision = '408eefbb94e1'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('enterprise_pledge')
op.drop_table('company_danbao')
op.drop_table('company_pledge')
op.drop_table('enterprise_danbao')
op.add_column('company_admin_permission', sa.Column('ent_id', sa.String(length=32), nullable=True, comment='企业id'))
op.add_column('company_admin_permission', sa.Column('licence_no', sa.String(length=32), nullable=True, comment='企业行政许可编号'))
op.add_column('company_admin_permission', sa.Column('licence_name', sa.String(length=32), nullable=True, comment='企业行政许可证名称'))
op.add_column('company_admin_permission', sa.Column('from_date', sa.String(length=32), nullable=True, comment='有效期自'))
op.add_column('company_admin_permission', sa.Column('end_date', sa.String(length=32), nullable=True, comment='有效期至'))
op.add_column('company_admin_permission', sa.Column('license_org', sa.String(length=32), nullable=True, comment='许可机关'))
op.add_column('company_admin_permission', sa.Column('licence_content', sa.String(length=32), nullable=True, comment='许可内容'))
op.alter_column('company_admin_permission', 'id',
existing_type=mysql.INTEGER(display_width=11),
comment='企业行政许可主键id',
existing_comment='晋城企业行政许可主键id',
existing_nullable=False,
autoincrement=True)
op.create_table_comment(
'company_admin_permission',
'企业行政许可数据表',
existing_comment='晋城企业行政许可数据表',
schema=None
)
op.drop_column('company_admin_permission', 'number')
op.drop_column('company_admin_permission', 'company_id')
op.drop_column('company_admin_permission', 'content')
op.drop_column('company_admin_permission', 'Licensing_authority')
op.drop_column('company_admin_permission', 'effective_data')
op.drop_column('company_admin_permission', 'time')
op.drop_column('company_admin_permission', 'name')
op.add_column('company_customer', sa.Column('ent_id', sa.Integer(), nullable=True, comment='企业id'))
op.add_column('company_customer', sa.Column('client_name', sa.String(length=32), nullable=True, comment='客户'))
op.add_column('company_customer', sa.Column('ratio', sa.String(length=32), nullable=True, comment='销售占比'))
op.add_column('company_customer', sa.Column('amount', sa.String(length=32), nullable=True, comment='销售金额'))
op.add_column('company_customer', sa.Column('pub_date', sa.DateTime(), nullable=True, comment='公开时间'))
op.add_column('company_customer', sa.Column('sources', sa.String(length=32), nullable=True, comment='数据来源'))
op.alter_column('company_customer', 'id',
existing_type=mysql.INTEGER(display_width=11),
comment='企业客户主键id',
existing_comment='晋城企业客户主键id',
existing_nullable=False,
autoincrement=True)
op.create_table_comment(
'company_customer',
'企业客户数据表',
existing_comment='晋城企业客户数据表',
schema=None
)
op.drop_column('company_customer', 'data_source')
op.drop_column('company_customer', 'company_id')
op.drop_column('company_customer', 'sales_money')
op.drop_column('company_customer', 'open_time')
op.drop_column('company_customer', 'sales_rate')
op.drop_column('company_customer', 'customer_name')
op.add_column('company_import_export', sa.Column('ent_id', sa.Integer(), nullable=True, comment='企业id'))
op.add_column('company_import_export', sa.Column('customs_registered_address', sa.String(length=32), nullable=True, comment='注册海关'))
op.add_column('company_import_export', sa.Column('management_category', sa.String(length=32), nullable=True, comment='经营类别'))
op.add_column('company_import_export', sa.Column('record_date', sa.DateTime(), nullable=True, comment='注册日期'))
op.add_column('company_import_export', sa.Column('industry_category', sa.String(length=32), nullable=True, comment='行业类别'))
op.alter_column('company_import_export', 'id',
existing_type=mysql.INTEGER(display_width=11),
comment='企业进出口信用主键id',
existing_comment='晋城企业进出口信用主键id',
existing_nullable=False,
autoincrement=True)
op.create_table_comment(
'company_import_export',
'企业进出口信用数据表',
existing_comment='晋城企业进出口信用数据表',
schema=None
)
op.drop_column('company_import_export', 'company_id')
op.drop_column('company_import_export', 'business_category')
op.drop_column('company_import_export', 'register_customs')
op.drop_column('company_import_export', 'register_date')
op.add_column('company_patent', sa.Column('ent_id', sa.Integer(), nullable=True, comment='企业id'))
op.add_column('company_patent', sa.Column('apply_number', sa.String(length=50), nullable=True, comment='申请号'))
op.add_column('company_patent', sa.Column('apply_date', sa.DateTime(), nullable=True, comment='申请日'))
op.add_column('company_patent', sa.Column('pub_number', sa.String(length=20), nullable=True, comment='公开号'))
op.add_column('company_patent', sa.Column('pub_date', sa.DateTime(), nullable=True, comment='公开日期'))
op.add_column('company_patent', sa.Column('inventor', sa.String(length=20), nullable=True, comment='发明人'))
op.create_table_comment(
'company_patent',
'企业详情专利信息',
existing_comment='晋城企业详情专利信息',
schema=None
)
op.drop_column('company_patent', 'company_id')
op.drop_column('company_patent', 'day')
op.drop_column('company_patent', 'num')
op.drop_column('company_patent', 'person')
op.drop_column('company_patent', 'open_num')
op.drop_column('company_patent', 'datatime')
op.add_column('company_stock', sa.Column('ent_id', sa.String(length=32), nullable=True, comment='企业id'))
op.add_column('company_stock', sa.Column('reg_number', sa.String(length=32), nullable=True, comment='等级编号'))
op.add_column('company_stock', sa.Column('pledgor', sa.String(length=10), nullable=True, comment='出质人'))
op.add_column('company_stock', sa.Column('target_company', sa.String(length=25), nullable=True, comment='出质股权的企业'))
op.add_column('company_stock', sa.Column('pub_date', sa.String(length=32), nullable=True, comment='登记日期'))
op.create_table_comment(
'company_stock',
'企业详情股权出质',
existing_comment='晋城企业详情股权出质',
schema=None
)
op.drop_column('company_stock', 'from_company')
op.drop_column('company_stock', 'company_id')
op.drop_column('company_stock', 'num')
op.drop_column('company_stock', 'person')
op.drop_column('company_stock', 'datatime')
op.add_column('company_supplier', sa.Column('ent_id', sa.String(length=32), nullable=True, comment='企业id'))
op.add_column('company_supplier', sa.Column('ratio', sa.String(length=32), nullable=True, comment='采购占比'))
op.add_column('company_supplier', sa.Column('amount', sa.String(length=32), nullable=True, comment='采购金额'))
op.add_column('company_supplier', sa.Column('pub_date', sa.DateTime(), nullable=True, comment='公开时间'))
op.add_column('company_supplier', sa.Column('sources', sa.String(length=32), nullable=True, comment='数据来源'))
op.alter_column('company_supplier', 'id',
existing_type=mysql.INTEGER(display_width=11),
comment='企业供应商主键id',
existing_comment='晋城企业供应商主键id',
existing_nullable=False,
autoincrement=True)
op.create_table_comment(
'company_supplier',
'企业供应商数据表',
existing_comment='晋城企业供应商数据表',
schema=None
)
op.drop_column('company_supplier', 'buy_rate')
op.drop_column('company_supplier', 'data_source')
op.drop_column('company_supplier', 'company_id')
op.drop_column('company_supplier', 'buy_money')
op.drop_column('company_supplier', 'open_time')
op.add_column('company_tax_credit', sa.Column('ent_id', sa.String(length=32), nullable=True, comment='企业id'))
op.add_column('company_tax_credit', sa.Column('name', sa.String(length=32), nullable=True, comment='名称'))
op.add_column('company_tax_credit', sa.Column('year', sa.String(length=32), nullable=True, comment='评价年度'))
op.add_column('company_tax_credit', sa.Column('id_number', sa.String(length=32), nullable=True, comment='纳税人识别号'))
op.add_column('company_tax_credit', sa.Column('grade', sa.String(length=32), nullable=True, comment='纳税信用等级'))
op.add_column('company_tax_credit', sa.Column('eval_department', sa.String(length=32), nullable=True, comment='单位评价'))
op.add_column('company_tax_credit', sa.Column('type', sa.String(length=32), nullable=True, comment='类型'))
op.add_column('company_tax_credit', sa.Column('business_id', sa.String(length=32), nullable=True, comment='数据id'))
op.alter_column('company_tax_credit', 'id',
existing_type=mysql.INTEGER(display_width=11),
comment='企业税务信用主键id',
existing_comment='晋城企业税务信用主键id',
existing_nullable=False,
autoincrement=True)
op.create_table_comment(
'company_tax_credit',
'企业税务信用数据表',
existing_comment='晋城企业税务信用数据表',
schema=None
)
op.drop_column('company_tax_credit', 'company_id')
op.drop_column('company_tax_credit', 'evaluation_annual')
op.drop_column('company_tax_credit', 'identify_number')
op.drop_column('company_tax_credit', 'level')
op.drop_column('company_tax_credit', 'evaluate')
op.add_column('enterprise_admin_permission', sa.Column('ent_id', sa.String(length=32), nullable=True, comment='企业id'))
op.add_column('enterprise_admin_permission', sa.Column('licence_no', sa.String(length=32), nullable=True, comment='企业行政许可编号'))
op.add_column('enterprise_admin_permission', sa.Column('licence_name', sa.String(length=32), nullable=True, comment='企业行政许可证名称'))
op.add_column('enterprise_admin_permission', sa.Column('from_date', sa.String(length=32), nullable=True, comment='有效期自'))
op.add_column('enterprise_admin_permission', sa.Column('end_date', sa.String(length=32), nullable=True, comment='有效期至'))
op.add_column('enterprise_admin_permission', sa.Column('license_org', sa.String(length=32), nullable=True, comment='许可机关'))
op.add_column('enterprise_admin_permission', sa.Column('licence_content', sa.String(length=32), nullable=True, comment='许可内容'))
op.alter_column('enterprise_admin_permission', 'id',
existing_type=mysql.INTEGER(display_width=11),
comment='企业行政许可主键id',
existing_comment='全国企业表企业行政许可主键id',
existing_nullable=False,
autoincrement=True)
op.drop_column('enterprise_admin_permission', 'number')
op.drop_column('enterprise_admin_permission', 'company_id')
op.drop_column('enterprise_admin_permission', 'content')
op.drop_column('enterprise_admin_permission', 'Licensing_authority')
op.drop_column('enterprise_admin_permission', 'effective_data')
op.drop_column('enterprise_admin_permission', 'time')
op.drop_column('enterprise_admin_permission', 'name')
op.add_column('enterprise_customer', sa.Column('ent_id', sa.Integer(), nullable=True, comment='企业id'))
op.add_column('enterprise_customer', sa.Column('client_name', sa.String(length=32), nullable=True, comment='客户'))
op.add_column('enterprise_customer', sa.Column('ratio', sa.String(length=32), nullable=True, comment='销售占比'))
op.add_column('enterprise_customer', sa.Column('amount', sa.String(length=32), nullable=True, comment='销售金额'))
op.add_column('enterprise_customer', sa.Column('pub_date', sa.DateTime(), nullable=True, comment='公开时间'))
op.add_column('enterprise_customer', sa.Column('sources', sa.String(length=32), nullable=True, comment='数据来源'))
op.alter_column('enterprise_customer', 'id',
existing_type=mysql.INTEGER(display_width=11),
comment='企业客户主键id',
existing_comment='全国企业表企业客户主键id',
existing_nullable=False,
autoincrement=True)
op.drop_column('enterprise_customer', 'data_source')
op.drop_column('enterprise_customer', 'company_id')
op.drop_column('enterprise_customer', 'sales_money')
op.drop_column('enterprise_customer', 'open_time')
op.drop_column('enterprise_customer', 'sales_rate')
op.drop_column('enterprise_customer', 'customer_name')
op.add_column('enterprise_import_export', sa.Column('ent_id', sa.Integer(), nullable=True, comment='企业id'))
op.add_column('enterprise_import_export', sa.Column('customs_registered_address', sa.String(length=32), nullable=True, comment='注册海关'))
op.add_column('enterprise_import_export', sa.Column('management_category', sa.String(length=32), nullable=True, comment='经营类别'))
op.add_column('enterprise_import_export', sa.Column('record_date', sa.DateTime(), nullable=True, comment='注册日期'))
op.add_column('enterprise_import_export', sa.Column('industry_category', sa.String(length=32), nullable=True, comment='行业类别'))
op.alter_column('enterprise_import_export', 'id',
existing_type=mysql.INTEGER(display_width=11),
comment='企业进出口信用主键id',
existing_comment='全国企业表企业进出口信用主键id',
existing_nullable=False,
autoincrement=True)
op.drop_column('enterprise_import_export', 'company_id')
op.drop_column('enterprise_import_export', 'business_category')
op.drop_column('enterprise_import_export', 'register_customs')
op.drop_column('enterprise_import_export', 'register_date')
op.add_column('enterprise_patent', sa.Column('ent_id', sa.Integer(), nullable=True, comment='企业id'))
op.add_column('enterprise_patent', sa.Column('apply_number', sa.String(length=50), nullable=True, comment='申请号'))
op.add_column('enterprise_patent', sa.Column('apply_date', sa.DateTime(), nullable=True, comment='申请日'))
op.add_column('enterprise_patent', sa.Column('pub_number', sa.String(length=20), nullable=True, comment='公开号'))
op.add_column('enterprise_patent', sa.Column('pub_date', sa.DateTime(), nullable=True, comment='公开日期'))
op.add_column('enterprise_patent', sa.Column('inventor', sa.String(length=20), nullable=True, comment='发明人'))
op.drop_column('enterprise_patent', 'company_id')
op.drop_column('enterprise_patent', 'day')
op.drop_column('enterprise_patent', 'num')
op.drop_column('enterprise_patent', 'person')
op.drop_column('enterprise_patent', 'open_num')
op.drop_column('enterprise_patent', 'datatime')
op.add_column('enterprise_stock', sa.Column('ent_id', sa.String(length=32), nullable=True, comment='企业id'))
op.add_column('enterprise_stock', sa.Column('reg_number', sa.String(length=32), nullable=True, comment='等级编号'))
op.add_column('enterprise_stock', sa.Column('pledgor', sa.String(length=10), nullable=True, comment='出质人'))
op.add_column('enterprise_stock', sa.Column('target_company', sa.String(length=25), nullable=True, comment='出质股权的企业'))
op.add_column('enterprise_stock', sa.Column('pub_date', sa.String(length=32), nullable=True, comment='登记日期'))
op.drop_column('enterprise_stock', 'from_company')
op.drop_column('enterprise_stock', 'company_id')
op.drop_column('enterprise_stock', 'num')
op.drop_column('enterprise_stock', 'person')
op.drop_column('enterprise_stock', 'datatime')
op.add_column('enterprise_supplier', sa.Column('ent_id', sa.String(length=32), nullable=True, comment='企业id'))
op.add_column('enterprise_supplier', sa.Column('ratio', sa.String(length=32), nullable=True, comment='采购占比'))
op.add_column('enterprise_supplier', sa.Column('amount', sa.String(length=32), nullable=True, comment='采购金额'))
op.add_column('enterprise_supplier', sa.Column('pub_date', sa.DateTime(), nullable=True, comment='公开时间'))
op.add_column('enterprise_supplier', sa.Column('sources', sa.String(length=32), nullable=True, comment='数据来源'))
op.alter_column('enterprise_supplier', 'id',
existing_type=mysql.INTEGER(display_width=11),
comment='企业供应商主键id',
existing_comment='全国企业表企业供应商主键id',
existing_nullable=False,
autoincrement=True)
op.drop_column('enterprise_supplier', 'buy_rate')
op.drop_column('enterprise_supplier', 'data_source')
op.drop_column('enterprise_supplier', 'company_id')
op.drop_column('enterprise_supplier', 'buy_money')
op.drop_column('enterprise_supplier', 'open_time')
op.add_column('enterprise_tax_credit', sa.Column('ent_id', sa.String(length=32), nullable=True, comment='企业id'))
op.add_column('enterprise_tax_credit', sa.Column('name', sa.String(length=32), nullable=True, comment='名称'))
op.add_column('enterprise_tax_credit', sa.Column('year', sa.String(length=32), nullable=True, comment='评价年度'))
op.add_column('enterprise_tax_credit', sa.Column('id_number', sa.String(length=32), nullable=True, comment='纳税人识别号'))
op.add_column('enterprise_tax_credit', sa.Column('grade', sa.String(length=32), nullable=True, comment='纳税信用等级'))
op.add_column('enterprise_tax_credit', sa.Column('eval_department', sa.String(length=32), nullable=True, comment='单位评价'))
op.add_column('enterprise_tax_credit', sa.Column('type', sa.String(length=32), nullable=True, comment='类型'))
op.add_column('enterprise_tax_credit', sa.Column('business_id', sa.String(length=32), nullable=True, comment='数据id'))
op.alter_column('enterprise_tax_credit', 'id',
existing_type=mysql.INTEGER(display_width=11),
comment='企业税务信用主键id',
existing_comment='全国企业表企业税务信用主键id',
existing_nullable=False,
autoincrement=True)
op.drop_column('enterprise_tax_credit', 'company_id')
op.drop_column('enterprise_tax_credit', 'evaluation_annual')
op.drop_column('enterprise_tax_credit', 'identify_number')
op.drop_column('enterprise_tax_credit', 'level')
op.drop_column('enterprise_tax_credit', 'evaluate')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('enterprise_tax_credit', sa.Column('evaluate', mysql.VARCHAR(length=32), nullable=True, comment='单位评价'))
op.add_column('enterprise_tax_credit', sa.Column('level', mysql.VARCHAR(length=32), nullable=True, comment='纳税信用等级'))
op.add_column('enterprise_tax_credit', sa.Column('identify_number', mysql.VARCHAR(length=32), nullable=True, comment='纳税人识别号'))
op.add_column('enterprise_tax_credit', sa.Column('evaluation_annual', mysql.VARCHAR(length=32), nullable=True, comment='评价年度'))
op.add_column('enterprise_tax_credit', sa.Column('company_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='全国企业表企业id'))
op.alter_column('enterprise_tax_credit', 'id',
existing_type=mysql.INTEGER(display_width=11),
comment='全国企业表企业税务信用主键id',
existing_comment='企业税务信用主键id',
existing_nullable=False,
autoincrement=True)
op.drop_column('enterprise_tax_credit', 'business_id')
op.drop_column('enterprise_tax_credit', 'type')
op.drop_column('enterprise_tax_credit', 'eval_department')
op.drop_column('enterprise_tax_credit', 'grade')
op.drop_column('enterprise_tax_credit', 'id_number')
op.drop_column('enterprise_tax_credit', 'year')
op.drop_column('enterprise_tax_credit', 'name')
op.drop_column('enterprise_tax_credit', 'ent_id')
op.add_column('enterprise_supplier', sa.Column('open_time', mysql.DATETIME(), nullable=True, comment='公开时间'))
op.add_column('enterprise_supplier', sa.Column('buy_money', mysql.VARCHAR(length=32), nullable=True, comment='采购金额'))
op.add_column('enterprise_supplier', sa.Column('company_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='全国企业表企业id'))
op.add_column('enterprise_supplier', sa.Column('data_source', mysql.VARCHAR(length=32), nullable=True, comment='数据来源'))
op.add_column('enterprise_supplier', sa.Column('buy_rate', mysql.VARCHAR(length=32), nullable=True, comment='采购占比'))
op.alter_column('enterprise_supplier', 'id',
existing_type=mysql.INTEGER(display_width=11),
comment='全国企业表企业供应商主键id',
existing_comment='企业供应商主键id',
existing_nullable=False,
autoincrement=True)
op.drop_column('enterprise_supplier', 'sources')
op.drop_column('enterprise_supplier', 'pub_date')
op.drop_column('enterprise_supplier', 'amount')
op.drop_column('enterprise_supplier', 'ratio')
op.drop_column('enterprise_supplier', 'ent_id')
op.add_column('enterprise_stock', sa.Column('datatime', mysql.DATETIME(), nullable=True, comment='登记日期'))
op.add_column('enterprise_stock', sa.Column('person', mysql.VARCHAR(length=10), nullable=True, comment='出质人'))
op.add_column('enterprise_stock', sa.Column('num', mysql.VARCHAR(length=32), nullable=True, comment='等级编号'))
op.add_column('enterprise_stock', sa.Column('company_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='全国企业表企业id'))
op.add_column('enterprise_stock', sa.Column('from_company', mysql.VARCHAR(length=25), nullable=True, comment='出质股权的企业'))
op.drop_column('enterprise_stock', 'pub_date')
op.drop_column('enterprise_stock', 'target_company')
op.drop_column('enterprise_stock', 'pledgor')
op.drop_column('enterprise_stock', 'reg_number')
op.drop_column('enterprise_stock', 'ent_id')
op.add_column('enterprise_patent', sa.Column('datatime', mysql.DATETIME(), nullable=True, comment='公开日期'))
op.add_column('enterprise_patent', sa.Column('open_num', mysql.VARCHAR(length=20), nullable=True, comment='公开号'))
op.add_column('enterprise_patent', sa.Column('person', mysql.VARCHAR(length=20), nullable=True, comment='发明人'))
op.add_column('enterprise_patent', sa.Column('num', mysql.VARCHAR(length=50), nullable=True, comment='申请号'))
op.add_column('enterprise_patent', sa.Column('day', mysql.DATETIME(), nullable=True, comment='申请日'))
op.add_column('enterprise_patent', sa.Column('company_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='全国企业表企业id'))
op.drop_column('enterprise_patent', 'inventor')
op.drop_column('enterprise_patent', 'pub_date')
op.drop_column('enterprise_patent', 'pub_number')
op.drop_column('enterprise_patent', 'apply_date')
op.drop_column('enterprise_patent', 'apply_number')
op.drop_column('enterprise_patent', 'ent_id')
op.add_column('enterprise_import_export', sa.Column('register_date', mysql.DATETIME(), nullable=True, comment='注册日期'))
op.add_column('enterprise_import_export', sa.Column('register_customs', mysql.VARCHAR(length=32), nullable=True, comment='注册海关'))
op.add_column('enterprise_import_export', sa.Column('business_category', mysql.VARCHAR(length=32), nullable=True, comment='经营类别'))
op.add_column('enterprise_import_export', sa.Column('company_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='全国企业表企业id'))
op.alter_column('enterprise_import_export', 'id',
existing_type=mysql.INTEGER(display_width=11),
comment='全国企业表企业进出口信用主键id',
existing_comment='企业进出口信用主键id',
existing_nullable=False,
autoincrement=True)
op.drop_column('enterprise_import_export', 'industry_category')
op.drop_column('enterprise_import_export', 'record_date')
op.drop_column('enterprise_import_export', 'management_category')
op.drop_column('enterprise_import_export', 'customs_registered_address')
op.drop_column('enterprise_import_export', 'ent_id')
op.add_column('enterprise_customer', sa.Column('customer_name', mysql.VARCHAR(length=32), nullable=True, comment='客户'))
op.add_column('enterprise_customer', sa.Column('sales_rate', mysql.VARCHAR(length=32), nullable=True, comment='销售占比'))
op.add_column('enterprise_customer', sa.Column('open_time', mysql.DATETIME(), nullable=True, comment='公开时间'))
op.add_column('enterprise_customer', sa.Column('sales_money', mysql.VARCHAR(length=32), nullable=True, comment='销售金额'))
op.add_column('enterprise_customer', sa.Column('company_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='全国企业表企业id'))
op.add_column('enterprise_customer', sa.Column('data_source', mysql.VARCHAR(length=32), nullable=True, comment='数据来源'))
op.alter_column('enterprise_customer', 'id',
existing_type=mysql.INTEGER(display_width=11),
comment='全国企业表企业客户主键id',
existing_comment='企业客户主键id',
existing_nullable=False,
autoincrement=True)
op.drop_column('enterprise_customer', 'sources')
op.drop_column('enterprise_customer', 'pub_date')
op.drop_column('enterprise_customer', 'amount')
op.drop_column('enterprise_customer', 'ratio')
op.drop_column('enterprise_customer', 'client_name')
op.drop_column('enterprise_customer', 'ent_id')
op.add_column('enterprise_admin_permission', sa.Column('name', mysql.VARCHAR(length=32), nullable=True, comment='全国企业表企业行政许可证名称'))
op.add_column('enterprise_admin_permission', sa.Column('time', mysql.DATETIME(), nullable=True, comment='有效期自'))
op.add_column('enterprise_admin_permission', sa.Column('effective_data', mysql.DATETIME(), nullable=True, comment='有效期至'))
op.add_column('enterprise_admin_permission', sa.Column('Licensing_authority', mysql.VARCHAR(length=32), nullable=True, comment='许可机关'))
op.add_column('enterprise_admin_permission', sa.Column('content', mysql.VARCHAR(length=32), nullable=True, comment='许可内容'))
op.add_column('enterprise_admin_permission', sa.Column('company_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='全国企业表企业id'))
op.add_column('enterprise_admin_permission', sa.Column('number', mysql.VARCHAR(length=32), nullable=True, comment='全国企业表企业行政许可编号'))
op.alter_column('enterprise_admin_permission', 'id',
existing_type=mysql.INTEGER(display_width=11),
comment='全国企业表企业行政许可主键id',
existing_comment='企业行政许可主键id',
existing_nullable=False,
autoincrement=True)
op.drop_column('enterprise_admin_permission', 'licence_content')
op.drop_column('enterprise_admin_permission', 'license_org')
op.drop_column('enterprise_admin_permission', 'end_date')
op.drop_column('enterprise_admin_permission', 'from_date')
op.drop_column('enterprise_admin_permission', 'licence_name')
op.drop_column('enterprise_admin_permission', 'licence_no')
op.drop_column('enterprise_admin_permission', 'ent_id')
op.add_column('company_tax_credit', sa.Column('evaluate', mysql.VARCHAR(length=32), nullable=True, comment='单位评价'))
op.add_column('company_tax_credit', sa.Column('level', mysql.VARCHAR(length=32), nullable=True, comment='纳税信用等级'))
op.add_column('company_tax_credit', sa.Column('identify_number', mysql.VARCHAR(length=32), nullable=True, comment='纳税人识别号'))
op.add_column('company_tax_credit', sa.Column('evaluation_annual', mysql.VARCHAR(length=32), nullable=True, comment='评价年度'))
op.add_column('company_tax_credit', sa.Column('company_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='晋城企业id'))
op.create_table_comment(
'company_tax_credit',
'晋城企业税务信用数据表',
existing_comment='企业税务信用数据表',
schema=None
)
op.alter_column('company_tax_credit', 'id',
existing_type=mysql.INTEGER(display_width=11),
comment='晋城企业税务信用主键id',
existing_comment='企业税务信用主键id',
existing_nullable=False,
autoincrement=True)
op.drop_column('company_tax_credit', 'business_id')
op.drop_column('company_tax_credit', 'type')
op.drop_column('company_tax_credit', 'eval_department')
op.drop_column('company_tax_credit', 'grade')
op.drop_column('company_tax_credit', 'id_number')
op.drop_column('company_tax_credit', 'year')
op.drop_column('company_tax_credit', 'name')
op.drop_column('company_tax_credit', 'ent_id')
op.add_column('company_supplier', sa.Column('open_time', mysql.DATETIME(), nullable=True, comment='公开时间'))
op.add_column('company_supplier', sa.Column('buy_money', mysql.VARCHAR(length=32), nullable=True, comment='采购金额'))
op.add_column('company_supplier', sa.Column('company_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='晋城企业id'))
op.add_column('company_supplier', sa.Column('data_source', mysql.VARCHAR(length=32), nullable=True, comment='数据来源'))
op.add_column('company_supplier', sa.Column('buy_rate', mysql.VARCHAR(length=32), nullable=True, comment='采购占比'))
op.create_table_comment(
'company_supplier',
'晋城企业供应商数据表',
existing_comment='企业供应商数据表',
schema=None
)
op.alter_column('company_supplier', 'id',
existing_type=mysql.INTEGER(display_width=11),
comment='晋城企业供应商主键id',
existing_comment='企业供应商主键id',
existing_nullable=False,
autoincrement=True)
op.drop_column('company_supplier', 'sources')
op.drop_column('company_supplier', 'pub_date')
op.drop_column('company_supplier', 'amount')
op.drop_column('company_supplier', 'ratio')
op.drop_column('company_supplier', 'ent_id')
op.add_column('company_stock', sa.Column('datatime', mysql.DATETIME(), nullable=True, comment='登记日期'))
op.add_column('company_stock', sa.Column('person', mysql.VARCHAR(length=10), nullable=True, comment='出质人'))
op.add_column('company_stock', sa.Column('num', mysql.VARCHAR(length=32), nullable=True, comment='等级编号'))
op.add_column('company_stock', sa.Column('company_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='晋城企业id'))
op.add_column('company_stock', sa.Column('from_company', mysql.VARCHAR(length=25), nullable=True, comment='出质股权的企业'))
op.create_table_comment(
'company_stock',
'晋城企业详情股权出质',
existing_comment='企业详情股权出质',
schema=None
)
op.drop_column('company_stock', 'pub_date')
op.drop_column('company_stock', 'target_company')
op.drop_column('company_stock', 'pledgor')
op.drop_column('company_stock', 'reg_number')
op.drop_column('company_stock', 'ent_id')
op.add_column('company_patent', sa.Column('datatime', mysql.DATETIME(), nullable=True, comment='公开日期'))
op.add_column('company_patent', sa.Column('open_num', mysql.VARCHAR(length=20), nullable=True, comment='公开号'))
op.add_column('company_patent', sa.Column('person', mysql.VARCHAR(length=20), nullable=True, comment='发明人'))
op.add_column('company_patent', sa.Column('num', mysql.VARCHAR(length=50), nullable=True, comment='申请号'))
op.add_column('company_patent', sa.Column('day', mysql.DATETIME(), nullable=True, comment='申请日'))
op.add_column('company_patent', sa.Column('company_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='晋城企业id'))
op.create_table_comment(
'company_patent',
'晋城企业详情专利信息',
existing_comment='企业详情专利信息',
schema=None
)
op.drop_column('company_patent', 'inventor')
op.drop_column('company_patent', 'pub_date')
op.drop_column('company_patent', 'pub_number')
op.drop_column('company_patent', 'apply_date')
op.drop_column('company_patent', 'apply_number')
op.drop_column('company_patent', 'ent_id')
op.add_column('company_import_export', sa.Column('register_date', mysql.DATETIME(), nullable=True, comment='注册日期'))
op.add_column('company_import_export', sa.Column('register_customs', mysql.VARCHAR(length=32), nullable=True, comment='注册海关'))
op.add_column('company_import_export', sa.Column('business_category', mysql.VARCHAR(length=32), nullable=True, comment='经营类别'))
op.add_column('company_import_export', sa.Column('company_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='晋城企业id'))
op.create_table_comment(
'company_import_export',
'晋城企业进出口信用数据表',
existing_comment='企业进出口信用数据表',
schema=None
)
op.alter_column('company_import_export', 'id',
existing_type=mysql.INTEGER(display_width=11),
comment='晋城企业进出口信用主键id',
existing_comment='企业进出口信用主键id',
existing_nullable=False,
autoincrement=True)
op.drop_column('company_import_export', 'industry_category')
op.drop_column('company_import_export', 'record_date')
op.drop_column('company_import_export', 'management_category')
op.drop_column('company_import_export', 'customs_registered_address')
op.drop_column('company_import_export', 'ent_id')
op.add_column('company_customer', sa.Column('customer_name', mysql.VARCHAR(length=32), nullable=True, comment='客户'))
op.add_column('company_customer', sa.Column('sales_rate', mysql.VARCHAR(length=32), nullable=True, comment='销售占比'))
op.add_column('company_customer', sa.Column('open_time', mysql.DATETIME(), nullable=True, comment='公开时间'))
op.add_column('company_customer', sa.Column('sales_money', mysql.VARCHAR(length=32), nullable=True, comment='销售金额'))
op.add_column('company_customer', sa.Column('company_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='晋城企业id'))
op.add_column('company_customer', sa.Column('data_source', mysql.VARCHAR(length=32), nullable=True, comment='数据来源'))
op.create_table_comment(
'company_customer',
'晋城企业客户数据表',
existing_comment='企业客户数据表',
schema=None
)
op.alter_column('company_customer', 'id',
existing_type=mysql.INTEGER(display_width=11),
comment='晋城企业客户主键id',
existing_comment='企业客户主键id',
existing_nullable=False,
autoincrement=True)
op.drop_column('company_customer', 'sources')
op.drop_column('company_customer', 'pub_date')
op.drop_column('company_customer', 'amount')
op.drop_column('company_customer', 'ratio')
op.drop_column('company_customer', 'client_name')
op.drop_column('company_customer', 'ent_id')
op.add_column('company_admin_permission', sa.Column('name', mysql.VARCHAR(length=32), nullable=True, comment='晋城企业行政许可证名称'))
op.add_column('company_admin_permission', sa.Column('time', mysql.DATETIME(), nullable=True, comment='有效期自'))
op.add_column('company_admin_permission', sa.Column('effective_data', mysql.DATETIME(), nullable=True, comment='有效期至'))
op.add_column('company_admin_permission', sa.Column('Licensing_authority', mysql.VARCHAR(length=32), nullable=True, comment='许可机关'))
op.add_column('company_admin_permission', sa.Column('content', mysql.VARCHAR(length=32), nullable=True, comment='许可内容'))
op.add_column('company_admin_permission', sa.Column('company_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='晋城企业id'))
op.add_column('company_admin_permission', sa.Column('number', mysql.VARCHAR(length=32), nullable=True, comment='晋城企业行政许可编号'))
op.create_table_comment(
'company_admin_permission',
'晋城企业行政许可数据表',
existing_comment='企业行政许可数据表',
schema=None
)
op.alter_column('company_admin_permission', 'id',
existing_type=mysql.INTEGER(display_width=11),
comment='晋城企业行政许可主键id',
existing_comment='企业行政许可主键id',
existing_nullable=False,
autoincrement=True)
op.drop_column('company_admin_permission', 'licence_content')
op.drop_column('company_admin_permission', 'license_org')
op.drop_column('company_admin_permission', 'end_date')
op.drop_column('company_admin_permission', 'from_date')
op.drop_column('company_admin_permission', 'licence_name')
op.drop_column('company_admin_permission', 'licence_no')
op.drop_column('company_admin_permission', 'ent_id')
op.create_table('enterprise_danbao',
sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False, comment='担保信息主键id'),
sa.Column('company_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='全国企业表企业id'),
sa.Column('person1', mysql.VARCHAR(length=10), nullable=True, comment='被担保方'),
sa.Column('person2', mysql.VARCHAR(length=10), nullable=True, comment='担保方'),
sa.Column('method', mysql.VARCHAR(length=10), nullable=True, comment='方式'),
sa.Column('amount', mysql.FLOAT(), nullable=True, comment='担保金额(万元)'),
sa.Column('datatime', mysql.DATETIME(), nullable=True, comment='公告日期'),
sa.PrimaryKeyConstraint('id'),
comment='全国企业表企业详情担保信息',
mysql_comment='全国企业表企业详情担保信息',
mysql_default_charset='utf8',
mysql_engine='InnoDB'
)
op.create_table('company_pledge',
sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False, comment='股权质押主键id'),
sa.Column('company_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='晋城企业id'),
sa.Column('person1', mysql.VARCHAR(length=10), nullable=True, comment='质押人'),
sa.Column('jion_company', mysql.VARCHAR(length=25), nullable=True, comment='参股企业'),
sa.Column('person2', mysql.VARCHAR(length=10), nullable=True, comment='质押权人'),
sa.Column('number', mysql.FLOAT(), nullable=True, comment='质押股份总额(股)'),
sa.Column('amount', mysql.FLOAT(), nullable=True, comment='质押股份市值(元)'),
sa.Column('status', mysql.VARCHAR(length=10), nullable=True, comment='状态'),
sa.Column('datatime', mysql.DATETIME(), nullable=True, comment='公告日期'),
sa.PrimaryKeyConstraint('id'),
comment='晋城企业详情股权质押',
mysql_comment='晋城企业详情股权质押',
mysql_default_charset='utf8',
mysql_engine='InnoDB'
)
op.create_table('company_danbao',
sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False, comment='担保信息主键id'),
sa.Column('company_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='晋城企业id'),
sa.Column('person1', mysql.VARCHAR(length=10), nullable=True, comment='被担保方'),
sa.Column('person2', mysql.VARCHAR(length=10), nullable=True, comment='担保方'),
sa.Column('method', mysql.VARCHAR(length=10), nullable=True, comment='方式'),
sa.Column('amount', mysql.FLOAT(), nullable=True, comment='担保金额(万元)'),
sa.Column('datatime', mysql.DATETIME(), nullable=True, comment='公告日期'),
sa.PrimaryKeyConstraint('id'),
comment='晋城企业详情担保信息',
mysql_comment='晋城企业详情担保信息',
mysql_default_charset='utf8',
mysql_engine='InnoDB'
)
op.create_table('enterprise_pledge',
sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False, comment='股权质押主键id'),
sa.Column('company_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='全国企业表企业id'),
sa.Column('person1', mysql.VARCHAR(length=10), nullable=True, comment='质押人'),
sa.Column('jion_company', mysql.VARCHAR(length=25), nullable=True, comment='参股企业'),
sa.Column('person2', mysql.VARCHAR(length=10), nullable=True, comment='质押权人'),
sa.Column('number', mysql.FLOAT(), nullable=True, comment='质押股份总额(股)'),
sa.Column('amount', mysql.FLOAT(), nullable=True, comment='质押股份市值(元)'),
sa.Column('status', mysql.VARCHAR(length=10), nullable=True, comment='状态'),
sa.Column('datatime', mysql.DATETIME(), nullable=True, comment='公告日期'),
sa.PrimaryKeyConstraint('id'),
comment='全国企业表企业详情股权质押',
mysql_comment='全国企业表企业详情股权质押',
mysql_default_charset='utf8',
mysql_engine='InnoDB'
)
# ### end Alembic commands ###
"""empty message
Revision ID: a96dec87213e
Revises: 16fd9d84e92d
Create Date: 2023-02-23 18:49:46.888528
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'a96dec87213e'
down_revision = '16fd9d84e92d'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('user_project',
sa.Column('create_time', sa.DateTime(), nullable=True, comment='创建时间'),
sa.Column('update_time', sa.DateTime(), nullable=True, comment='更新时间'),
sa.Column('user_id', sa.Integer(), nullable=False),
sa.Column('factory_id', sa.Integer(), nullable=False),
sa.ForeignKeyConstraint(['factory_id'], ['project.id'], ),
sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
sa.PrimaryKeyConstraint('user_id', 'factory_id')
)
op.create_table('user_zone',
sa.Column('create_time', sa.DateTime(), nullable=True, comment='创建时间'),
sa.Column('update_time', sa.DateTime(), nullable=True, comment='更新时间'),
sa.Column('user_id', sa.Integer(), nullable=False),
sa.Column('factory_id', sa.Integer(), nullable=False),
sa.ForeignKeyConstraint(['factory_id'], ['induzone.id'], ),
sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
sa.PrimaryKeyConstraint('user_id', 'factory_id')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('user_zone')
op.drop_table('user_project')
# ### end Alembic commands ###
"""empty message
Revision ID: aee7c7c614f7
Revises: 972efac77f90
Create Date: 2023-02-24 18:10:25.302072
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'aee7c7c614f7'
down_revision = '972efac77f90'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('enterprise', sa.Column('company_id', sa.Integer(), nullable=True, comment='企业id'))
op.create_index(op.f('ix_enterprise_company_id'), 'enterprise', ['company_id'], unique=True)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f('ix_enterprise_company_id'), table_name='enterprise')
op.drop_column('enterprise', 'company_id')
# ### end Alembic commands ###
"""empty message
Revision ID: b585af1123cc
Revises: c5717f535139
Create Date: 2023-01-04 10:02:00.258236
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'b585af1123cc'
down_revision = 'c5717f535139'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('user', sa.Column('org_id', sa.Integer(), nullable=True))
op.create_foreign_key(None, 'user', 'organization_chart', ['org_id'], ['id'])
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint(None, 'user', type_='foreignkey')
op.drop_column('user', 'org_id')
# ### end Alembic commands ###
"""empty message
Revision ID: b9af264d3544
Revises: 6af94c9dab96
Create Date: 2022-11-24 09:50:34.689852
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'b9af264d3544'
down_revision = '6af94c9dab96'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('shanxi_target',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('file_name', sa.String(length=30), nullable=True, comment='文件名称'),
sa.Column('data_time', sa.String(length=30), nullable=True, comment='数据年份'),
sa.Column('upload_time', sa.String(length=30), nullable=True, comment='上传日期'),
sa.Column('upload_unit', sa.String(length=30), nullable=True, comment='上传部门'),
sa.Column('upload_people', sa.String(length=30), nullable=True, comment='上传人'),
sa.Column('sign_money', sa.Float(), nullable=True, comment='签约金额'),
sa.Column('sign_target_money', sa.Float(), nullable=True, comment='目标金额'),
sa.Column('sign_finish_rate', sa.Float(), nullable=True, comment='完成率'),
sa.Column('plan_invest_money', sa.Float(), nullable=True, comment='计划投资额'),
sa.Column('plan_target_money', sa.Float(), nullable=True, comment='目标计划投资额'),
sa.Column('plan_finish_rate', sa.Float(), nullable=True, comment='计划投资额完成率'),
sa.Column('arrive_money', sa.Float(), nullable=True, comment='资金到位'),
sa.Column('arrive_target_money', sa.Float(), nullable=True, comment='目标资金到位'),
sa.Column('arrive_finish_rate', sa.Float(), nullable=True, comment='计划投资额完成率'),
sa.PrimaryKeyConstraint('id'),
comment='项目化管理-山西省地市指标表'
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('shanxi_target')
# ### end Alembic commands ###
"""empty message
Revision ID: bbe194dda5cc
Revises: 86f617b5d0c7
Create Date: 2022-11-11 17:37:26.520171
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'bbe194dda5cc'
down_revision = '86f617b5d0c7'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('siku_project', sa.Column('sign_year', sa.Integer(), nullable=True, comment='签约年份'))
op.add_column('siku_project', sa.Column('start_year', sa.Integer(), nullable=True, comment='开工年份'))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('siku_project', 'start_year')
op.drop_column('siku_project', 'sign_year')
# ### end Alembic commands ###
"""empty message
Revision ID: c04177a30f4a
Revises: 796079d17881
Create Date: 2023-02-13 16:57:22.527221
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'c04177a30f4a'
down_revision = '796079d17881'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('industry_chain', sa.Column('enterprise_num', sa.Integer(), nullable=True, comment='相关全企业表数量'))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('industry_chain', 'enterprise_num')
# ### end Alembic commands ###
"""empty message
Revision ID: c40a14ba57b8
Revises: 6470d982afcb
Create Date: 2022-11-27 01:00:01.657030
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = 'c40a14ba57b8'
down_revision = '6470d982afcb'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('money_arrive',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('is_delete', sa.Integer(), nullable=True, comment='逻辑删除'),
sa.Column('data_time', sa.String(length=30), nullable=True, comment='数据年份'),
sa.Column('upload_time', sa.String(length=30), nullable=True, comment='上传日期'),
sa.Column('upload_unit', sa.String(length=30), nullable=True, comment='上传部门'),
sa.Column('upload_people', sa.String(length=30), nullable=True, comment='上传人'),
sa.Column('district_name', sa.String(length=30), nullable=True, comment='区县名称'),
sa.Column('arrive_money', sa.Float(), nullable=True, comment='固定资产投资项目资金到位额('),
sa.PrimaryKeyConstraint('id'),
comment='项目化管理-固定资产投资项目资金到位表'
)
op.alter_column('jc_target', 'grade_sign',
existing_type=mysql.FLOAT(),
comment='签约项目情况赋分15',
existing_comment='签约项目金额',
existing_nullable=True)
op.alter_column('jc_target', 'grade_start',
existing_type=mysql.FLOAT(),
comment='项目开工率赋分5',
existing_comment='项目开工率',
existing_nullable=True)
op.alter_column('jc_target', 'grade_plan_invest',
existing_type=mysql.FLOAT(),
comment='新开工固定资产投资项目计划投资赋分25',
existing_comment='新开工固定资产投资项目计划投资额',
existing_nullable=True)
op.alter_column('jc_target', 'grade_arrive_target1',
existing_type=mysql.FLOAT(),
comment='固定资产投资项目资金到位赋分25',
existing_comment='固定资产投资项目资金到位额',
existing_nullable=True)
op.alter_column('jc_target', 'grade_arrive_target0',
existing_type=mysql.FLOAT(),
comment='非固定资产投资项目资金到位赋分5',
existing_comment='非固定资产投资项目资金到位额',
existing_nullable=True)
op.alter_column('jc_target', 'money_sign',
existing_type=mysql.FLOAT(),
comment='签约项目金额(年度目标)',
existing_comment='签约项目金额',
existing_nullable=True)
op.alter_column('jc_target', 'rate_start',
existing_type=mysql.FLOAT(),
comment='项目开工率(年度目标)',
existing_comment='项目开工率',
existing_nullable=True)
op.alter_column('jc_target', 'money_plan_invest',
existing_type=mysql.FLOAT(),
comment='新开工固定资产投资项目计划投资额(年度目标)',
existing_comment='新开工固定资产投资项目计划投资额',
existing_nullable=True)
op.alter_column('jc_target', 'money_arrive_target1',
existing_type=mysql.FLOAT(),
comment='固定资产投资项目资金到位额(年度目标)',
existing_comment='固定资产投资项目资金到位额',
existing_nullable=True)
op.alter_column('jc_target', 'money_arrive_target0',
existing_type=mysql.FLOAT(),
comment='非固定资产投资项目资金到位额(年度目标)',
existing_comment='非固定资产投资项目资金到位额',
existing_nullable=True)
op.add_column('project_management', sa.Column('industry2', sa.String(length=20), nullable=True, comment='所属行业-二级产业'))
op.add_column('project_management', sa.Column('industry_level', sa.String(length=20), nullable=True, comment='所属项目产业级别'))
op.alter_column('project_management', 'industry',
existing_type=mysql.VARCHAR(length=20),
comment='所属行业-一级产业',
existing_comment='所属行业',
existing_nullable=True)
op.alter_column('shanxi_target', 'sign_target_money',
existing_type=mysql.FLOAT(),
comment='目标金额(年度目标)',
existing_comment='目标金额',
existing_nullable=True)
op.alter_column('shanxi_target', 'plan_target_money',
existing_type=mysql.FLOAT(),
comment='目标计划投资额(年度目标)',
existing_comment='目标计划投资额',
existing_nullable=True)
op.alter_column('shanxi_target', 'arrive_target_money',
existing_type=mysql.FLOAT(),
comment='目标资金到位(年度目标)',
existing_comment='目标资金到位',
existing_nullable=True)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('shanxi_target', 'arrive_target_money',
existing_type=mysql.FLOAT(),
comment='目标资金到位',
existing_comment='目标资金到位(年度目标)',
existing_nullable=True)
op.alter_column('shanxi_target', 'plan_target_money',
existing_type=mysql.FLOAT(),
comment='目标计划投资额',
existing_comment='目标计划投资额(年度目标)',
existing_nullable=True)
op.alter_column('shanxi_target', 'sign_target_money',
existing_type=mysql.FLOAT(),
comment='目标金额',
existing_comment='目标金额(年度目标)',
existing_nullable=True)
op.alter_column('project_management', 'industry',
existing_type=mysql.VARCHAR(length=20),
comment='所属行业',
existing_comment='所属行业-一级产业',
existing_nullable=True)
op.drop_column('project_management', 'industry_level')
op.drop_column('project_management', 'industry2')
op.alter_column('jc_target', 'money_arrive_target0',
existing_type=mysql.FLOAT(),
comment='非固定资产投资项目资金到位额',
existing_comment='非固定资产投资项目资金到位额(年度目标)',
existing_nullable=True)
op.alter_column('jc_target', 'money_arrive_target1',
existing_type=mysql.FLOAT(),
comment='固定资产投资项目资金到位额',
existing_comment='固定资产投资项目资金到位额(年度目标)',
existing_nullable=True)
op.alter_column('jc_target', 'money_plan_invest',
existing_type=mysql.FLOAT(),
comment='新开工固定资产投资项目计划投资额',
existing_comment='新开工固定资产投资项目计划投资额(年度目标)',
existing_nullable=True)
op.alter_column('jc_target', 'rate_start',
existing_type=mysql.FLOAT(),
comment='项目开工率',
existing_comment='项目开工率(年度目标)',
existing_nullable=True)
op.alter_column('jc_target', 'money_sign',
existing_type=mysql.FLOAT(),
comment='签约项目金额',
existing_comment='签约项目金额(年度目标)',
existing_nullable=True)
op.alter_column('jc_target', 'grade_arrive_target0',
existing_type=mysql.FLOAT(),
comment='非固定资产投资项目资金到位额',
existing_comment='非固定资产投资项目资金到位赋分5',
existing_nullable=True)
op.alter_column('jc_target', 'grade_arrive_target1',
existing_type=mysql.FLOAT(),
comment='固定资产投资项目资金到位额',
existing_comment='固定资产投资项目资金到位赋分25',
existing_nullable=True)
op.alter_column('jc_target', 'grade_plan_invest',
existing_type=mysql.FLOAT(),
comment='新开工固定资产投资项目计划投资额',
existing_comment='新开工固定资产投资项目计划投资赋分25',
existing_nullable=True)
op.alter_column('jc_target', 'grade_start',
existing_type=mysql.FLOAT(),
comment='项目开工率',
existing_comment='项目开工率赋分5',
existing_nullable=True)
op.alter_column('jc_target', 'grade_sign',
existing_type=mysql.FLOAT(),
comment='签约项目金额',
existing_comment='签约项目情况赋分15',
existing_nullable=True)
op.drop_table('money_arrive')
# ### end Alembic commands ###
"""empty message
Revision ID: c5717f535139
Revises: 0faa9eac099f
Create Date: 2023-01-03 16:58:30.235508
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = 'c5717f535139'
down_revision = '0faa9eac099f'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('search_list')
op.drop_table('industry_collect')
op.drop_table('carrier_area_data')
op.drop_table('carrier_area')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('carrier_area',
sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('district_name', mysql.VARCHAR(length=20), nullable=True, comment='区域名称'),
sa.Column('lng', mysql.VARCHAR(length=50), nullable=True, comment='经度'),
sa.Column('lat', mysql.VARCHAR(length=50), nullable=True, comment='维度'),
sa.Column('build_area', mysql.VARCHAR(length=20), nullable=True, comment='楼宇当前总面积(㎡)'),
sa.Column('build_current_empty_area', mysql.VARCHAR(length=20), nullable=True, comment='楼宇当前闲置面积(㎡)'),
sa.Column('build_last_empty_area', mysql.VARCHAR(length=20), nullable=True, comment='楼宇去年闲置面积(㎡)'),
sa.Column('factory_area', mysql.VARCHAR(length=20), nullable=True, comment='厂房当前总面积(㎡)'),
sa.Column('factory_current_empty_area', mysql.VARCHAR(length=20), nullable=True, comment='厂房当前闲置面积(㎡)'),
sa.Column('factory_last_empty_area', mysql.VARCHAR(length=20), nullable=True, comment='厂房去年闲置面积(㎡)'),
sa.Column('plan_land_store_area', mysql.VARCHAR(length=20), nullable=True, comment='计划土地储备面积(亩)'),
sa.Column('plan_land_supply_area', mysql.VARCHAR(length=20), nullable=True, comment='计划土地供应面积(亩)'),
sa.Column('plan_land_stock_area', mysql.VARCHAR(length=20), nullable=True, comment='计划土地存量面积(亩)'),
sa.Column('land_area', mysql.VARCHAR(length=20), nullable=True, comment='土地当前总面积(亩)'),
sa.Column('land_current_empty_area', mysql.VARCHAR(length=20), nullable=True, comment='土地当前闲置面积(亩)'),
sa.Column('land_last_empty_area', mysql.VARCHAR(length=20), nullable=True, comment='土地去年闲置面积(亩)'),
sa.PrimaryKeyConstraint('id'),
comment='载体资源库-产业地图-各载体类型面积数据表',
mysql_comment='载体资源库-产业地图-各载体类型面积数据表',
mysql_default_charset='utf8',
mysql_engine='InnoDB'
)
op.create_table('carrier_area_data',
sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('district_name', mysql.VARCHAR(length=20), nullable=True, comment='区域名称'),
sa.Column('land_year', mysql.VARCHAR(length=20), nullable=True, comment='土地全年闲置面积'),
sa.Column('land_one', mysql.VARCHAR(length=20), nullable=True, comment='土地第一季度闲置面积'),
sa.Column('land_two', mysql.VARCHAR(length=20), nullable=True, comment='土地第二季度闲置面积'),
sa.Column('land_three', mysql.VARCHAR(length=20), nullable=True, comment='土地第三季度闲置面积'),
sa.Column('land_four', mysql.VARCHAR(length=20), nullable=True, comment='土地第四季度闲置面积'),
sa.Column('factory_year', mysql.VARCHAR(length=20), nullable=True, comment='厂房全年闲置面积'),
sa.Column('factory_one', mysql.VARCHAR(length=20), nullable=True, comment='厂房第一季度闲置面积'),
sa.Column('factory_two', mysql.VARCHAR(length=20), nullable=True, comment='厂房第二季度闲置面积'),
sa.Column('factory_three', mysql.VARCHAR(length=20), nullable=True, comment='厂房第三季度闲置面积'),
sa.Column('factory_four', mysql.VARCHAR(length=20), nullable=True, comment='厂房第四季度闲置面积'),
sa.Column('build_year', mysql.VARCHAR(length=20), nullable=True, comment='楼宇全年闲置面积'),
sa.Column('build_one', mysql.VARCHAR(length=20), nullable=True, comment='楼宇第一季度闲置面积'),
sa.Column('build_two', mysql.VARCHAR(length=20), nullable=True, comment='楼宇第二季度闲置面积'),
sa.Column('build_three', mysql.VARCHAR(length=20), nullable=True, comment='楼宇第三季度闲置面积'),
sa.Column('build_four', mysql.VARCHAR(length=20), nullable=True, comment='楼宇第四季度闲置面积'),
sa.PrimaryKeyConstraint('id'),
comment='载体资源库-产业地图-各区县各载体闲置面积数据表',
mysql_comment='载体资源库-产业地图-各区县各载体闲置面积数据表',
mysql_default_charset='utf8',
mysql_engine='InnoDB'
)
op.create_table('industry_collect',
sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('user_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='用户id'),
sa.Column('collect_time', mysql.VARCHAR(length=30), nullable=True, comment='收藏时间'),
sa.Column('industry_name', mysql.VARCHAR(length=30), nullable=True, comment='收藏的产业名称'),
sa.Column('industry_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='产业id'),
sa.PrimaryKeyConstraint('id'),
comment='招商图谱-产业链收藏',
mysql_comment='招商图谱-产业链收藏',
mysql_default_charset='utf8',
mysql_engine='InnoDB'
)
op.create_table('search_list',
sa.Column('create_time', mysql.DATETIME(), nullable=True, comment='创建时间'),
sa.Column('update_time', mysql.DATETIME(), nullable=True, comment='更新时间'),
sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('history', mysql.VARCHAR(length=128), nullable=True, comment='用户搜索历史'),
sa.Column('user_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='用户id'),
sa.ForeignKeyConstraint(['user_id'], ['user.id'], name='search_list_ibfk_1'),
sa.PrimaryKeyConstraint('id'),
comment='360企业画像--查找历史数据表',
mysql_comment='360企业画像--查找历史数据表',
mysql_default_charset='utf8',
mysql_engine='InnoDB'
)
# ### end Alembic commands ###
"""empty message
Revision ID: c652571798e5
Revises: 577f52798418
Create Date: 2023-02-01 16:13:29.814193
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'c652571798e5'
down_revision = '577f52798418'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('carrier_land', sa.Column('attract_status', sa.String(length=20), nullable=True, comment='拟招引状态'))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('carrier_land', 'attract_status')
# ### end Alembic commands ###
"""empty message
Revision ID: c842c3d27d7d
Revises: d84887496a75
Create Date: 2023-02-22 14:30:15.655338
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'c842c3d27d7d'
down_revision = 'd84887496a75'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('carrier_build', sa.Column('upload_time', sa.DateTime(), nullable=True, comment='数据上传时间'))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('carrier_build', 'upload_time')
# ### end Alembic commands ###
"""empty message
Revision ID: cbc99f0303a6
Revises: 08c109f72e57
Create Date: 2022-11-16 17:09:33.539374
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = 'cbc99f0303a6'
down_revision = '08c109f72e57'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('joint_img',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('flag', sa.Integer(), nullable=True, comment='2为对接库,3为签约库,4为开工库'),
sa.Column('img_url', sa.String(length=300), nullable=True, comment='相关印证资料图片url'),
sa.Column('img_name', sa.String(length=20), nullable=True, comment='相关印证资料图片名称'),
sa.Column('project_id', sa.Integer(), nullable=True, comment='外键id,项目id'),
sa.ForeignKeyConstraint(['project_id'], ['siku_project.id'], ),
sa.PrimaryKeyConstraint('id'),
comment='四库管理对接库-相关印证资料图片'
)
op.create_table('progress_condition',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('flag', sa.Integer(), nullable=True, comment='2为对接库,3为签约库,4为开工库'),
sa.Column('add_time', sa.String(length=20), nullable=True, comment='添加时间'),
sa.Column('info', sa.String(length=20), nullable=True, comment='项目对接情况'),
sa.Column('project_id', sa.Integer(), nullable=True, comment='外键id,项目id'),
sa.ForeignKeyConstraint(['project_id'], ['siku_project.id'], ),
sa.PrimaryKeyConstraint('id'),
comment='四库管理对接库-项目进展(项目对接情况/项目推进情况)'
)
op.add_column('siku_project', sa.Column('garden', sa.String(length=20), nullable=True, comment='园区'))
op.alter_column('siku_project', 'thread_progress',
existing_type=mysql.VARCHAR(length=30),
comment='线索(项目)进展',
existing_comment='线索进展',
existing_nullable=True)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('siku_project', 'thread_progress',
existing_type=mysql.VARCHAR(length=30),
comment='线索进展',
existing_comment='线索(项目)进展',
existing_nullable=True)
op.drop_column('siku_project', 'garden')
op.drop_table('progress_condition')
op.drop_table('joint_img')
# ### end Alembic commands ###
"""empty message
Revision ID: cd765f81acd4
Revises: 4875ed38bd46
Create Date: 2023-03-10 17:58:34.497551
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = 'cd765f81acd4'
down_revision = '4875ed38bd46'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('company_punish', 'pub_date',
existing_type=mysql.VARCHAR(length=32),
comment='处罚日期',
existing_comment='公开日期',
existing_nullable=True)
op.alter_column('company_punish', 'punish_no',
existing_type=mysql.VARCHAR(length=32),
comment='决定文书号',
existing_comment='处罚日期',
existing_nullable=True)
op.alter_column('company_punish', 'punish_reason',
existing_type=mysql.VARCHAR(length=32),
comment='处罚事由',
existing_comment='决定文书号',
existing_nullable=True)
op.alter_column('company_punish', 'punish_content',
existing_type=mysql.VARCHAR(length=32),
comment='处罚结果/内容',
existing_comment='处罚事由/违法行为类型',
existing_nullable=True)
op.alter_column('company_punish', 'punish_org',
existing_type=mysql.VARCHAR(length=32),
comment='处罚单位',
existing_comment='处罚结果/内容',
existing_nullable=True)
op.alter_column('company_punish', 'sources',
existing_type=mysql.VARCHAR(length=32),
comment='来源',
existing_comment='处罚单位',
existing_nullable=True)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('company_punish', 'sources',
existing_type=mysql.VARCHAR(length=32),
comment='处罚单位',
existing_comment='来源',
existing_nullable=True)
op.alter_column('company_punish', 'punish_org',
existing_type=mysql.VARCHAR(length=32),
comment='处罚结果/内容',
existing_comment='处罚单位',
existing_nullable=True)
op.alter_column('company_punish', 'punish_content',
existing_type=mysql.VARCHAR(length=32),
comment='处罚事由/违法行为类型',
existing_comment='处罚结果/内容',
existing_nullable=True)
op.alter_column('company_punish', 'punish_reason',
existing_type=mysql.VARCHAR(length=32),
comment='决定文书号',
existing_comment='处罚事由',
existing_nullable=True)
op.alter_column('company_punish', 'punish_no',
existing_type=mysql.VARCHAR(length=32),
comment='处罚日期',
existing_comment='决定文书号',
existing_nullable=True)
op.alter_column('company_punish', 'pub_date',
existing_type=mysql.VARCHAR(length=32),
comment='公开日期',
existing_comment='处罚日期',
existing_nullable=True)
# ### end Alembic commands ###
"""empty message
Revision ID: d074791595d8
Revises: 86c28972faba
Create Date: 2023-04-04 15:33:00.201841
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = 'd074791595d8'
down_revision = '86c28972faba'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('enterprise_tax_info', 'ent_id',
existing_type=mysql.VARCHAR(length=32),
nullable=True,
existing_comment='企业id')
op.alter_column('enterprise_tax_info', 'name',
existing_type=mysql.VARCHAR(length=32),
nullable=True,
existing_comment='名称')
op.alter_column('enterprise_tax_info', 'id_number',
existing_type=mysql.VARCHAR(length=32),
nullable=True,
existing_comment='纳税人识别号')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('enterprise_tax_info', 'id_number',
existing_type=mysql.VARCHAR(length=32),
nullable=False,
existing_comment='纳税人识别号')
op.alter_column('enterprise_tax_info', 'name',
existing_type=mysql.VARCHAR(length=32),
nullable=False,
existing_comment='名称')
op.alter_column('enterprise_tax_info', 'ent_id',
existing_type=mysql.VARCHAR(length=32),
nullable=False,
existing_comment='企业id')
# ### end Alembic commands ###
"""empty message
Revision ID: d1f1ec828b23
Revises: 65b957f64433
Create Date: 2022-03-03 17:07:45.260792
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = 'd1f1ec828b23'
down_revision = '65b957f64433'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('user', 'status',
existing_type=mysql.INTEGER(display_width=11),
comment='0禁止,1在用',
existing_comment='通过1,在审2,驳回3',
existing_nullable=True)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('user', 'status',
existing_type=mysql.INTEGER(display_width=11),
comment='通过1,在审2,驳回3',
existing_comment='0禁止,1在用',
existing_nullable=True)
# ### end Alembic commands ###
"""empty message
Revision ID: d40bf2ca852c
Revises: 1e56d07b5625
Create Date: 2023-01-05 17:25:26.021660
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = 'd40bf2ca852c'
down_revision = '1e56d07b5625'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('city', sa.Column('flag', sa.Integer(), nullable=True, comment='数据标识 1整年数据,2阶段数据'))
op.alter_column('industry_chain', 'icon_url',
existing_type=mysql.VARCHAR(length=255),
comment='未选中时行业图标',
existing_comment='选中时行业图标',
existing_nullable=True)
op.alter_column('industry_chain', 'icon_url1',
existing_type=mysql.VARCHAR(length=255),
comment='选中时行业图标',
existing_comment='未选中时行业图标',
existing_nullable=True)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('industry_chain', 'icon_url1',
existing_type=mysql.VARCHAR(length=255),
comment='未选中时行业图标',
existing_comment='选中时行业图标',
existing_nullable=True)
op.alter_column('industry_chain', 'icon_url',
existing_type=mysql.VARCHAR(length=255),
comment='选中时行业图标',
existing_comment='未选中时行业图标',
existing_nullable=True)
op.drop_column('city', 'flag')
# ### end Alembic commands ###
"""empty message
Revision ID: d54ab46ad83a
Revises: cbc99f0303a6
Create Date: 2022-11-16 17:22:34.570236
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = 'd54ab46ad83a'
down_revision = 'cbc99f0303a6'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint('joint_img_ibfk_1', 'joint_img', type_='foreignkey')
op.drop_column('joint_img', 'project_id')
op.drop_constraint('progress_condition_ibfk_1', 'progress_condition', type_='foreignkey')
op.drop_column('progress_condition', 'project_id')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('progress_condition', sa.Column('project_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='外键id,项目id'))
op.create_foreign_key('progress_condition_ibfk_1', 'progress_condition', 'siku_project', ['project_id'], ['id'])
op.add_column('joint_img', sa.Column('project_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='外键id,项目id'))
op.create_foreign_key('joint_img_ibfk_1', 'joint_img', 'siku_project', ['project_id'], ['id'])
# ### end Alembic commands ###
"""empty message
Revision ID: d6c81d2c0cdd
Revises: 3bda08bf8007
Create Date: 2022-12-06 15:24:14.307239
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'd6c81d2c0cdd'
down_revision = '3bda08bf8007'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('carrier_area',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('district_name', sa.String(length=20), nullable=True, comment='区域名称'),
sa.Column('lng', sa.String(length=50), nullable=True, comment='经度'),
sa.Column('lat', sa.String(length=50), nullable=True, comment='维度'),
sa.Column('build_area', sa.String(length=20), nullable=True, comment='楼宇当前总面积(㎡)'),
sa.Column('build_current_empty_area', sa.String(length=20), nullable=True, comment='楼宇当前闲置面积(㎡)'),
sa.Column('build_last_empty_area', sa.String(length=20), nullable=True, comment='楼宇去年闲置面积(㎡)'),
sa.Column('factory_area', sa.String(length=20), nullable=True, comment='厂房当前总面积(㎡)'),
sa.Column('factory_current_empty_area', sa.String(length=20), nullable=True, comment='厂房当前闲置面积(㎡)'),
sa.Column('factory_last_empty_area', sa.String(length=20), nullable=True, comment='厂房去年闲置面积(㎡)'),
sa.Column('plan_land_store_area', sa.String(length=20), nullable=True, comment='计划土地储备面积(亩)'),
sa.Column('plan_land_supply_area', sa.String(length=20), nullable=True, comment='计划土地供应面积(亩)'),
sa.Column('plan_land_stock_area', sa.String(length=20), nullable=True, comment='计划土地存量面积(亩)'),
sa.Column('land_area', sa.String(length=20), nullable=True, comment='土地当前总面积(亩)'),
sa.Column('land_current_empty_area', sa.String(length=20), nullable=True, comment='土地当前闲置面积(亩)'),
sa.Column('land_last_empty_area', sa.String(length=20), nullable=True, comment='土地去年闲置面积(亩)'),
sa.PrimaryKeyConstraint('id'),
comment='载体资源库-产业地图-各载体类型面积数据表'
)
op.create_table('carrier_area_data',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('district_name', sa.String(length=20), nullable=True, comment='区域名称'),
sa.Column('land_year', sa.String(length=20), nullable=True, comment='土地全年闲置面积'),
sa.Column('land_one', sa.String(length=20), nullable=True, comment='土地第一季度闲置面积'),
sa.Column('land_two', sa.String(length=20), nullable=True, comment='土地第二季度闲置面积'),
sa.Column('land_three', sa.String(length=20), nullable=True, comment='土地第三季度闲置面积'),
sa.Column('land_four', sa.String(length=20), nullable=True, comment='土地第四季度闲置面积'),
sa.Column('factory_year', sa.String(length=20), nullable=True, comment='厂房全年闲置面积'),
sa.Column('factory_one', sa.String(length=20), nullable=True, comment='厂房第一季度闲置面积'),
sa.Column('factory_two', sa.String(length=20), nullable=True, comment='厂房第二季度闲置面积'),
sa.Column('factory_three', sa.String(length=20), nullable=True, comment='厂房第三季度闲置面积'),
sa.Column('factory_four', sa.String(length=20), nullable=True, comment='厂房第四季度闲置面积'),
sa.Column('build_year', sa.String(length=20), nullable=True, comment='楼宇全年闲置面积'),
sa.Column('build_one', sa.String(length=20), nullable=True, comment='楼宇第一季度闲置面积'),
sa.Column('build_two', sa.String(length=20), nullable=True, comment='楼宇第二季度闲置面积'),
sa.Column('build_three', sa.String(length=20), nullable=True, comment='楼宇第三季度闲置面积'),
sa.Column('build_four', sa.String(length=20), nullable=True, comment='楼宇第四季度闲置面积'),
sa.PrimaryKeyConstraint('id'),
comment='载体资源库-产业地图-各区县各载体闲置面积数据表'
)
op.create_table('carrier_energy',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('district_name', sa.String(length=20), nullable=True, comment='区域名称'),
sa.Column('electric_one', sa.String(length=50), nullable=True, comment='居民用电(一档)(元/度)'),
sa.Column('electric_two', sa.String(length=50), nullable=True, comment='居民用电(二档)(元/度)'),
sa.Column('electric_three', sa.String(length=20), nullable=True, comment='居民用电(三档)(元/度)'),
sa.Column('business_electric_feng', sa.String(length=20), nullable=True, comment='商业用电(峰段)(元/度)'),
sa.Column('business_electric_ping', sa.String(length=20), nullable=True, comment='商业用电(平段)(元/度)'),
sa.Column('business_electric_gu', sa.String(length=20), nullable=True, comment='商业用电(谷段)(元/度)'),
sa.Column('industrial_electric_feng', sa.String(length=20), nullable=True, comment='工业电价(峰段)(元/度)'),
sa.Column('industrial_electric_ping', sa.String(length=20), nullable=True, comment='工业电价(平段)(元/度)'),
sa.Column('industrial_electric_gu', sa.String(length=20), nullable=True, comment='工业电价(谷段)(元/度)'),
sa.Column('life_water_one', sa.String(length=20), nullable=True, comment='居民用水(一档)(元/吨)'),
sa.Column('life_water_two', sa.String(length=20), nullable=True, comment='居民用水(二档)(元/吨)'),
sa.Column('life_water_three', sa.String(length=20), nullable=True, comment='居民用水(三档)(元/吨)'),
sa.Column('business_water', sa.String(length=20), nullable=True, comment='商业用水(元/吨)'),
sa.Column('industrial_water', sa.String(length=20), nullable=True, comment='工业用水(元/吨)'),
sa.Column('special_water', sa.String(length=20), nullable=True, comment='特种用水(元/吨)'),
sa.Column('life_gas_one', sa.String(length=20), nullable=True, comment='居民用气(一档)(元/m³)'),
sa.Column('life_gas_two', sa.String(length=20), nullable=True, comment='居民用气(二档)(元/m³)'),
sa.Column('life_gas_three', sa.String(length=20), nullable=True, comment='居民用气(三档)(元/m³)'),
sa.PrimaryKeyConstraint('id'),
comment='载体资源库-产业地图-水电气热能源数据表'
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('carrier_energy')
op.drop_table('carrier_area_data')
op.drop_table('carrier_area')
# ### end Alembic commands ###
"""empty message
Revision ID: d84887496a75
Revises: 0aa5a0f4e755
Create Date: 2023-02-22 14:28:12.339139
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = 'd84887496a75'
down_revision = '0aa5a0f4e755'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('carrier_build', sa.Column('build_type', sa.String(length=20), nullable=True, comment='楼宇类型(商铺/写字楼/其他)'))
op.drop_column('carrier_build', 'builde_type')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('carrier_build', sa.Column('builde_type', mysql.VARCHAR(length=20), nullable=True, comment='楼宇类型(商铺/写字楼/其他)'))
op.drop_column('carrier_build', 'build_type')
# ### end Alembic commands ###
"""empty message
Revision ID: dae54e2910be
Revises: 1c2f6dbb41a4
Create Date: 2023-03-02 14:55:24.771073
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'dae54e2910be'
down_revision = '1c2f6dbb41a4'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('user_policy',
sa.Column('create_time', sa.DateTime(), nullable=True, comment='创建时间'),
sa.Column('update_time', sa.DateTime(), nullable=True, comment='更新时间'),
sa.Column('user_id', sa.Integer(), nullable=False),
sa.Column('policy_id', sa.Integer(), nullable=False),
sa.ForeignKeyConstraint(['policy_id'], ['indu_policy.id'], ),
sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
sa.PrimaryKeyConstraint('user_id', 'policy_id')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('user_policy')
# ### end Alembic commands ###
"""empty message
Revision ID: e361ab017b2b
Revises: 64b32417349b
Create Date: 2023-02-22 00:32:25.979908
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = 'e361ab017b2b'
down_revision = '64b32417349b'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('customer_consultation',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('project_name', sa.String(length=20), nullable=True, comment='项目名称'),
sa.Column('investor', sa.Integer(), nullable=True, comment='投资方名称'),
sa.Column('investor_place', sa.String(length=100), nullable=True, comment='投资方所在地'),
sa.Column('project_type', sa.String(length=20), nullable=True, comment='项目类型'),
sa.Column('investment_volume', sa.Text(), nullable=True, comment='总投资额'),
sa.Column('basic_information', sa.Text(), nullable=True, comment='项目方基本情况'),
sa.Column('land_area', sa.Text(), nullable=True, comment='拟落地区域'),
sa.Column('flag', sa.Integer(), nullable=True, comment='是否已回复 0否1是'),
sa.Column('reply_content', sa.Text(), nullable=True, comment='回复内容'),
sa.PrimaryKeyConstraint('id'),
comment='小程序-客户咨询信息表'
)
op.drop_table('investment_consultation')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('investment_consultation',
sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('project_name', mysql.VARCHAR(length=20), nullable=True, comment='项目名称'),
sa.Column('investor', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='投资方名称'),
sa.Column('investor_place', mysql.VARCHAR(length=100), nullable=True, comment='投资方所在地'),
sa.Column('project_type', mysql.VARCHAR(length=20), nullable=True, comment='项目类型'),
sa.Column('investment_volume', mysql.TEXT(), nullable=True, comment='总投资额'),
sa.Column('basic_information', mysql.TEXT(), nullable=True, comment='项目方基本情况'),
sa.Column('land_area', mysql.TEXT(), nullable=True, comment='拟落地区域'),
sa.Column('flag', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='是否已回复 0否1是'),
sa.Column('reply_content', mysql.TEXT(), nullable=True, comment='回复内容'),
sa.PrimaryKeyConstraint('id'),
comment='小程序-客户咨询信息表',
mysql_comment='小程序-客户咨询信息表',
mysql_default_charset='utf8',
mysql_engine='InnoDB'
)
op.drop_table('customer_consultation')
# ### end Alembic commands ###
"""empty message
Revision ID: e460c1f0a941
Revises: a96dec87213e
Create Date: 2023-02-24 14:25:52.952211
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'e460c1f0a941'
down_revision = 'a96dec87213e'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('introduction_meet', sa.Column('flag', sa.Integer(), nullable=True, comment='推介会类型'))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('introduction_meet', 'flag')
# ### end Alembic commands ###
"""empty message
Revision ID: f0d08e2d1ce5
Revises: 7c65fe37c77f
Create Date: 2022-11-18 15:11:47.135413
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'f0d08e2d1ce5'
down_revision = '7c65fe37c77f'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('project_dynamic_log',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='主键id'),
sa.Column('project_id', sa.Integer(), nullable=True, comment='项目id'),
sa.Column('operation_people', sa.String(length=30), nullable=True, comment='操作人'),
sa.Column('item', sa.String(length=255), nullable=True, comment='动态'),
sa.Column('time', sa.String(length=30), nullable=True, comment='时间'),
sa.PrimaryKeyConstraint('id'),
comment='四库管理-项目动态数据表'
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('project_dynamic_log')
# ### end Alembic commands ###
"""empty message
Revision ID: f66650ce2fa6
Revises: 9389167fc068
Create Date: 2023-04-18 15:38:22.487913
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'f66650ce2fa6'
down_revision = '9389167fc068'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('project', sa.Column('year', sa.Integer(), nullable=True, comment='年'))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('project', 'year')
# ### end Alembic commands ###
"""create table
Revision ID: f9b8176a53e7
Revises: 1edbd9516fdc
Create Date: 2021-12-07 15:59:46.236282
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'f9b8176a53e7'
down_revision = '1edbd9516fdc'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('induzone',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='园区主键id'),
sa.Column('name', sa.String(length=255), nullable=True, comment='园区名称'),
sa.Column('image', sa.String(length=255), nullable=True, comment='园区图片'),
sa.Column('phone', sa.String(length=255), nullable=True, comment='园区联系电话'),
sa.Column('address', sa.String(length=255), nullable=True, comment='园区地址'),
sa.Column('industry_position', sa.String(length=255), nullable=True, comment='产业定位'),
sa.Column('gdp', sa.Float(), nullable=True, comment='GDP(亿元)'),
sa.Column('represent', sa.Text(), nullable=True, comment='代表企业'),
sa.Column('introduct', sa.Text(), nullable=True, comment='园区简介'),
sa.Column('level', sa.String(length=32), nullable=True, comment='园区级别'),
sa.Column('district', sa.String(length=255), nullable=True, comment='园区区县'),
sa.Column('charge', sa.String(length=255), nullable=True, comment='园区负责人'),
sa.Column('site', sa.String(length=255), nullable=True, comment='园区所在地'),
sa.Column('industry_type', sa.String(length=255), nullable=True, comment='产业类型'),
sa.Column('area', sa.Float(), nullable=True, comment='占地面积(平方公里)'),
sa.Column('lng', sa.String(length=255), nullable=True, comment='经度'),
sa.Column('lat', sa.String(length=255), nullable=True, comment='纬度'),
sa.Column('cluster', sa.String(length=255), nullable=True, comment='产业集群'),
sa.Column('cate', sa.String(length=255), nullable=True, comment='园区类型'),
sa.Column('invest_power', sa.Float(), nullable=True, comment='亩均投资强度(万元/亩)'),
sa.Column('value_product', sa.Float(), nullable=True, comment='亩均年产值(万元/亩)'),
sa.Column('tax', sa.Float(), nullable=True, comment='亩均年税收(万元/亩)'),
sa.Column('indu_land', sa.String(length=255), nullable=True, comment='工业土地均价(万元/亩)'),
sa.Column('comm_land', sa.String(length=255), nullable=True, comment='商办土地均价(万元/亩)'),
sa.Column('highmag', sa.String(length=255), nullable=True, comment='高层管理人员(元/月)'),
sa.Column('middlemag', sa.String(length=255), nullable=True, comment='中级管理人员(元/月)'),
sa.Column('worker', sa.String(length=255), nullable=True, comment='普通员工(元/月)'),
sa.Column('trans_facility', sa.Text(), nullable=True, comment='交通配套'),
sa.Column('goods_trans', sa.Text(), nullable=True, comment='货物运输'),
sa.Column('live_facility', sa.Text(), nullable=True, comment='园区生活配套'),
sa.Column('market', sa.Text(), nullable=True, comment='百货商场'),
sa.Column('hotel_bus', sa.Text(), nullable=True, comment='酒店商务'),
sa.Column('medical', sa.Text(), nullable=True, comment='医疗机构'),
sa.Column('education', sa.Text(), nullable=True, comment='教育教育'),
sa.Column('induenterprise', sa.Text(), nullable=True, comment='规模以上企业'),
sa.Column('innovate', sa.Text(), nullable=True, comment='科研机构'),
sa.Column('base', sa.Text(), nullable=True, comment='双创基地'),
sa.Column('carrier', sa.Text(), nullable=True, comment='产业载体'),
sa.Column('navigator', sa.String(length=255), nullable=True, comment='导航一'),
sa.Column('navigat', sa.String(length=255), nullable=True, comment='导航二'),
sa.Column('region', sa.String(length=255), nullable=True, comment='精确行政区'),
sa.Column('gdp_point', sa.Float(), nullable=True, comment='GDP的评分'),
sa.Column('school_point', sa.Float(), nullable=True, comment='高校院所的评分'),
sa.Column('mall_point', sa.Float(), nullable=True, comment='购物中心的评分'),
sa.Column('hotel_point', sa.Float(), nullable=True, comment='酒店餐饮的评分'),
sa.Column('policy_point', sa.Float(), nullable=True, comment='政策数的评分'),
sa.Column('development_zone', sa.String(length=255), nullable=True, comment='所在开发区'),
sa.PrimaryKeyConstraint('id'),
comment='晋城园区信息'
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('induzone')
# ### end Alembic commands ###
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment