Commit 095d4236 by dong

满城项目第一次提交

parent b1c0e280
# 太原招商图谱项目 # 满城招商图谱项目
# 如果找不到models,就在启动文件引入 # 如果找不到models,就在启动文件引入
# from apps.models import * # from apps.models import *
......
...@@ -61,7 +61,7 @@ def creat_app(config_name): ...@@ -61,7 +61,7 @@ def creat_app(config_name):
# 域名 # 域名
global SERVER_NAME global SERVER_NAME
SERVER_NAME = 'https://jincheng.industrychain.online' SERVER_NAME = 'https://mancheng.industrychain.online'
# 绑定SQLAlchemy的app对象 # 绑定SQLAlchemy的app对象
db.init_app(app) db.init_app(app)
...@@ -72,7 +72,7 @@ def creat_app(config_name): ...@@ -72,7 +72,7 @@ def creat_app(config_name):
# 初始化redis工具,创建Redis连接对象用于缓存 # 初始化redis工具,创建Redis连接对象用于缓存
global redis_store global redis_store
redis_store = redis.StrictRedis(host=config_class.REDIS_HOST, port=config_class.REDIS_PORT, redis_store = redis.StrictRedis(host=config_class.REDIS_HOST, port=config_class.REDIS_PORT,
db=2, password=config_class.REDIS_PASS) db=10, password=config_class.REDIS_PASS)
# cors跨域插件,是否允许发送cookies # cors跨域插件,是否允许发送cookies
CORS(app, resources=r'/*') CORS(app, resources=r'/*')
......
...@@ -515,7 +515,6 @@ def search_project(): ...@@ -515,7 +515,6 @@ def search_project():
SikuProject.flag >= flag if flag else text(''), # 线索库包含所有阶段的项目 SikuProject.flag >= flag if flag else text(''), # 线索库包含所有阶段的项目
SikuProject.is_delete == 0, SikuProject.is_delete == 0,
SikuProject.project_to_area == user_district if flag in [2, 3, 4] and user_district != '晋城市' else text(''), SikuProject.project_to_area == user_district if flag in [2, 3, 4] and user_district != '晋城市' else text(''),
# SikuProject.project_to_area1 == user_district if flag in [3, 4] and user_district != '晋城市' else text(''),
SikuProject.distribute_condition.in_(distribute_condition_list) if distribute_condition_list SikuProject.distribute_condition.in_(distribute_condition_list) if distribute_condition_list
else SikuProject.distribute_condition == distribute_condition if distribute_condition else text(''), else SikuProject.distribute_condition == distribute_condition if distribute_condition else text(''),
SikuProject.project_name.like('%{}%'.format(project_name)) if project_name else text(''), SikuProject.project_name.like('%{}%'.format(project_name)) if project_name else text(''),
......
import datetime
import pymysql
import requests
from lxml import etree
db = pymysql.connect(host='rm-8vbn50m65w332c23aso.mysql.zhangbei.rds.aliyuncs.com',
user='root',
password='Root@2020',
db='jincheng_data',
charset='utf8')
cur = db.cursor()
current_time = datetime.datetime.now()
def data_notification():
page_html_list = [
"index.shtml", # 首页
"index_1.shtml", # 第2页
"index_2.shtml", # 第3页
"index_3.shtml", # 第4页
"index_4.shtml", # 第5页
"index_5.shtml", # 第6页
"index_6.shtml", # 第7页
]
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 Edg/108.0.1462.54'}
data_list = []
for page_index in page_html_list:
url = "http://zsj.jcgov.gov.cn/sjtb/sjtb/{}".format(page_index)
try:
respose = requests.get(url, headers=headers)
respose.encoding = 'utf-8'
html_etree = ''
if respose.status_code == 200:
html_etree = etree.HTML(respose.text)
content_name_list = html_etree.xpath('//div[@class="newslist newslistdixx"]//span[@class="list_newstitle"]/a/text()')
content_url_list = html_etree.xpath('//div[@class="newslist newslistdixx"]//span[@class="list_newstitle"]/a/@href')
time_list = html_etree.xpath('//div[@class="newslist newslistdixx"]//span[2]/text()')
i = 0
for content_name in content_name_list:
content_url = content_url_list[i].replace("./", 'http://zsj.jcgov.gov.cn/sjtb/sjtb/'),
respose = requests.get(content_url[0], headers=headers)
respose.encoding = 'utf-8'
html_etree1 = ''
if respose.status_code == 200:
html_etree1 = etree.HTML(respose.text)
content = html_etree1.xpath('//table[1]')[2]
result = etree.tostring(content, encoding='utf-8').decode()
data_dic = {
"content_name": content_name,
# "content_url": content_url_list[i].replace('./', 'http://zsj.jcgov.gov.cn/sjtb/sjtb/'),
"content": result,
"time": time_list[i][1:-1]
}
data_list.append(data_dic)
i += 1
continue
continue
except Exception as e:
print("数据库错误", e)
# 存入数据库
i = 0
j = 0
add_list = []
for data in data_list:
content_name = data['content_name']
sql = "SELECT name FROM investment_information WHERE flag=2 and name='{}';".format(content_name)
cur.execute(sql)
name = cur.fetchone()
if name:
j += 1
continue
name = data['content_name']
flag = 2
content = data['content']
source = '晋城市投资促进中心'
time = data['time']
sql = "INSERT INTO investment_information(name, flag, time, source, content) VALUES ('{}', '{}', '{}', '{}', '{}');".format(name, flag, time, source, content)
cur.execute(sql)
db.commit()
add_list.append(name)
i += 1
if add_list:
print(current_time, "数据通报原有数据{}条,今日新增{}条,分别为{}".format(j, i, add_list))
else:
print(current_time, "数据通报原有数据{}条,今日新增{}条!".format(j, i))
def work_trend():
page_html_list = ["index.shtml"]
for i in range(1, 25):
html_index = 'index_{}.shtml'.format(i)
page_html_list.append(html_index)
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 Edg/108.0.1462.54'}
data_list = []
for page_index in page_html_list:
url = "http://zsj.jcgov.gov.cn/xwdt/zhxx/{}".format(page_index)
try:
html_etree = ''
respose = requests.get(url, headers=headers)
respose.encoding = 'utf-8'
if respose.status_code == 200:
html_etree = etree.HTML(respose.text)
content_name_list = html_etree.xpath('//div[@class="newslist newslistdixx"]//span[@class="list_newstitle"]/a/text()')
content_url_list = html_etree.xpath('//div[@class="newslist newslistdixx"]//span[@class="list_newstitle"]/a/@href')
time_list = html_etree.xpath('//div[@class="newslist newslistdixx"]//span[2]/text()')
i = 0
for content_name in content_name_list:
content_url = content_url_list[i].replace('./', 'http://zsj.jcgov.gov.cn/xwdt/zhxx/')
content_html = requests.get(content_url, headers=headers)
content_html.encoding = 'utf-8'
if content_html.status_code == 200:
html_etree1 = etree.HTML(content_html.text)
if content_name == "《晋城市招商引资十条优惠政策实施细则》解读":
handeled_html_str = etree.tostring(html_etree1).decode()
print(handeled_html_str)
# content_info_list = html_etree1.xpath(
# '//div[@class="view TRS_UEDITOR trs_paper_default trs_web"]/p/text()')
content_info_list = html_etree1.xpath(
'//div[@class="view TRS_UEDITOR trs_paper_default trs_web"]//text()')
if not content_info_list:
content_info_list = html_etree1.xpath(
'//div[@class="view TRS_UEDITOR trs_paper_default trs_word trs_web"]//text()')
if not content_info_list:
content_info_list = html_etree1.xpath(
'//div[@class="view TRS_UEDITOR trs_paper_default"]//@href')
if content_info_list and content_info_list[0].startswith('./'):
content_info_list = [
'请复制链接到浏览器查看:' + 'http://zsj.jcgov.gov.cn/xwdt/zhxx/202301/' + content_info_list[
0].replace('./', '')]
if content_info_list and content_info_list[0].startswith('http'):
content_info_list = ['请复制链接到浏览器查看:' + content_info_list[0]]
content_info1 = ''
for content_info in content_info_list:
content_info1 = content_info1 + '<br>' + content_info
data_dic = {
"content_name": content_name,
"content_info": content_info1,
"time": time_list[i][1:-1]
}
data_list.append(data_dic)
i += 1
continue
continue
except Exception as e:
print("数据库错误", e)
# # 存入数据库
i = 0
j = 0
add_list = []
for data in data_list:
content_name = data['content_name']
# name = data['content_name']
flag = 1
time = data['time']
source = '晋城市投资促进中心'
content = data['content_info']
sql = "SELECT name FROM investment_information WHERE flag=1 and name='{}';".format(content_name)
cur.execute(sql)
name = cur.fetchone()
if name:
j += 1
sql = "UPDATE investment_information SET time='{}', content='{}' WHERE name='{}';".format(time, content, content_name)
cur.execute(sql)
db.commit()
continue
# name = data['content_name']
# flag = 1
# time = data['time']
# source = '晋城市投资促进中心'
# content = data['content_info']
sql = "INSERT INTO investment_information(name, flag, time, source, content) VALUES('{}', '{}', '{}', '{}', '{}');".format(content_name, flag, time, source, content)
cur.execute(sql)
db.commit()
add_list.append(content_name)
i += 1
if add_list:
print(current_time, "工作动态原有数据{}条,今日新增{}条,分别为{}".format(j, i, add_list))
else:
print(current_time, "工作动态原有数据{}条,今日新增{}条!".format(j, i))
if __name__ == '__main__':
data_notification()
work_trend()
...@@ -8,12 +8,12 @@ from urllib import parse ...@@ -8,12 +8,12 @@ from urllib import parse
class Config: class Config:
# sql数据库 # sql数据库
# 在连接前将特殊的密码转码再链接即可 # 在连接前将特殊的密码转码再链接即可
passowrd = parse.quote_plus('devzysf#!241!668') # passowrd = parse.quote_plus('devzysf#!241!668')
SQLALCHEMY_DATABASE_URI = "mysql+pymysql://zysfdev:{}@rm-8vbn50m65w332c23aso.mysql.zhangbei.rds.aliyuncs.com/" \ # SQLALCHEMY_DATABASE_URI = "mysql+pymysql://zysfdev:{}@rm-8vbn50m65w332c23aso.mysql.zhangbei.rds.aliyuncs.com/" \
"jincheng_data?charset=utf8mb4".format(passowrd) # 晋城 阿里云 # "mancheng?charset=utf8mb4".format(passowrd) # 晋城 阿里云
# passowrd = parse.quote_plus('Root@2020') passowrd = parse.quote_plus('Root@2020')
# SQLALCHEMY_DATABASE_URI = "mysql+pymysql://root:{}@rm-8vbn50m65w332c23aso.mysql.zhangbei.rds.aliyuncs.com/" \ SQLALCHEMY_DATABASE_URI = "mysql+pymysql://root:{}@rm-8vbn50m65w332c23aso.mysql.zhangbei.rds.aliyuncs.com/" \
# "jincheng_data?charset=utf8mb4".format(passowrd) # 晋城 阿里云 "mancheng?charset=utf8mb4".format(passowrd) # 晋城 阿里云
SQLALCHEMY_TRACK_MODIFICATIONS = False SQLALCHEMY_TRACK_MODIFICATIONS = False
...@@ -39,6 +39,7 @@ class Config: ...@@ -39,6 +39,7 @@ class Config:
SESSION_REDIS = redis.StrictRedis(host=REDIS_HOST, port=REDIS_PORT, password=REDIS_PASS) SESSION_REDIS = redis.StrictRedis(host=REDIS_HOST, port=REDIS_PORT, password=REDIS_PASS)
SESSION_USE_SIGNER = True SESSION_USE_SIGNER = True
# 对session_id进行隐藏处理 # 对session_id进行隐藏处理
# PREMANENT_SESSION_LIFETIME = 60 # 整数表示秒 # PREMANENT_SESSION_LIFETIME = 60 # 整数表示秒
# 设置session的有效时间 # 设置session的有效时间
# PREMANENT_SESSION_LIFETIME = datetime.timedelta(hours=1) # PREMANENT_SESSION_LIFETIME = datetime.timedelta(hours=1)
......
"""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 ###
This source diff could not be displayed because it is too large. You can view the blob instead.
"""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 ###
alembic==1.7.4
aliyun-python-sdk-core==2.13.35
aliyun-python-sdk-kms==2.15.0
aliyun-python-sdk-vod==2.15.12
altgraph==0.16.1
amqp==5.1.1
APScheduler==3.9.1
asgiref==3.4.1
asn1crypto==0.24.0
atomicwrites==1.4.0
attrs==21.2.0
Automat==20.2.0
backports.csv==1.0.7
backports.zoneinfo==0.2.1
billiard==3.6.4.0
blinker==1.4
buildozer==0.39
cached-property==1.5.2
cachelib==0.4.1
celery==5.0.5
certifi==2018.8.24
cffi==1.15.0
chardet==3.0.4
click==7.1.2
click-didyoumean==0.3.0
click-plugins==1.1.1
click-repl==0.3.0
colorama==0.4.1
constantly==15.1.0
construct==2.5.3
coreapi==2.3.3
coreschema==0.0.4
cpca==0.5.5
crcmod==1.7
cryptography==35.0.0
cssselect==1.0.3
curve==0.1.0
cycler==0.10.0
Cython==0.29.13
dataclasses==0.8
defusedxml==0.6.0
diff-match-patch==20181111
distlib==0.3.7
Django==2.2.16
django-ckeditor==5.8.0
django-comment-migrate==0.1.5
django-cors-headers==2.5.3
django-crispy-forms==1.7.2
django-crontab==0.7.1
django-filter==2.1.0
django-formtools==2.1
django-import-export==1.2.0
django-js-asset==1.2.2
django-ranged-response==0.2.0
django-redis==4.10.0
django-reversion==3.0.4
django-timezone-field==4.2.3
djangorestframework==3.12.2
djangorestframework-jwt==1.11.0
dnspython==1.16.0
docker==5.0.3
document==1.0
docutils==0.15.2
docx==0.2.4
echarts==0.0.0
elasticsearch==7.15.1
english==2020.7.0
et-xmlfile==1.0.1
excel2json==1.0.1
fdfs-client-py==1.2.6
filelock==3.4.1
filetype==1.0.8
Flask==0.10.1
Flask-APScheduler==1.12.3
Flask-Cors==3.0.10
Flask-Docs==0.5.8
Flask-Mail==0.9.1
Flask-Migrate==2.7.0
Flask-QiniuStorage==0.9.5
Flask-Script==2.0.6
Flask-Session==0.4.0
Flask-SQLAlchemy==2.5.1
Flask-WTF==1.0.0
fsspec==2022.1.0
future==0.17.1
geographiclib==1.52
geopy==2.2.0
gevent==22.10.2
greenlet==2.0.2
haystack==0.42
httplib2==0.12.3
hyperlink==18.0.0
idna==2.7
importlib-metadata==4.8.3
importlib-resources==5.4.0
incremental==17.5.0
inflection==0.5.1
iniconfig==1.1.1
interchange==2021.0.3
itsdangerous==0.24
itypes==1.1.0
jdcal==1.4.1
Jinja2==2.10
jmespath==0.10.0
Kivy==1.11.1
kivy-deps.angle==0.1.9
kivy-deps.glew==0.1.12
kivy-deps.gstreamer==0.1.17
kivy-deps.sdl2==0.1.22
Kivy-examples==1.11.1
Kivy-Garden==0.1.4
kiwisolver==1.1.0
kombu==5.1.0
line==0.8.2
lxml==4.4.2
macholib==1.11
Mako==1.1.5
Markdown==3.3.4
MarkupSafe==1.0
matplotlib==3.1.2
mongoengine==0.24.2
monotonic==1.6
more-itertools==7.2.0
mutagen==1.42.0
mysql==0.0.2
mysqlclient @ file:///C:/Users/zy130/Downloads/mysqlclient-1.4.6-cp36-cp36m-win32.whl
Naked==0.1.31
ndg-httpsclient==0.5.1
neo4j-driver==1.6.2
neotime==1.0.0
nodejs==0.1.1
numpy==1.17.4
odfpy==1.4.0
opencv-python==4.5.3.56
openpyxl==2.6.3
optional-django==0.1.0
oss2==2.15.0
packaging==21.0
pandas==1.1.5
pansi==2020.7.3
pbr==4.2.0
pefile==2019.4.18
peppercorn==0.6
pexpect==4.7.0
Pillow==8.1.0
platformdirs==2.4.0
pluggy==1.0.0
prettytable==0.7.2
prompt-toolkit==3.0.36
psutil==5.8.0
psycopg2==2.8
ptyprocess==0.6.0
py==1.11.0
py2neo==4.1.1
pyahocorasick==1.4.4
pyasn1==0.4.4
pyasn1-modules==0.2.2
pycparser==2.19
pycryptodome==3.11.0
pydantic==1.9.2
PyDispatcher==2.0.5
pyecharts==1.2.0
pyecharts-jupyter-installer==0.0.3
Pygments==2.2.0
PyHamcrest==1.9.0
PyInstaller==3.4
PyJWT==1.7.1
pymongo==3.11.3
PyMySQL==0.9.3
pyOpenSSL==18.0.0
pyparsing==2.4.5
pypinyin==0.49.0
pypiwin32==223
pyquery==1.4.0
pytest==6.2.5
python-crontab==3.0.0
python-dateutil==2.8.1
python-docx==0.8.11
python-dotenv==0.20.0
python-ptrace==0.9.3
pytz==2021.1
pytz-deprecation-shim==0.1.0.post0
pywin32==227
pywin32-ctypes==0.2.0
PyYAML==5.1.2
qiniu==7.5.0
queuelib==1.5.0
redis==3.5.3
requests==2.19.1
rest-framework-auth0==0.5.0
rsa==4.0
ruamel.yaml==0.17.32
ruamel.yaml.clib==0.2.7
selenium==3.14.1
service-identity==17.0.0
sh==1.12.14
shellescape==3.8.1
six==1.15.0
SQLAlchemy==1.4.25
sqlparse==0.4.1
stevedore==1.29.0
tablib==0.13.0
thrift==0.11.0
toml==0.10.2
torch-vision==0.1.6.dev0
tqdm==4.32.1
Twisted==19.7.0
twisted-iocpsupport==1.0.2
typing-extensions==3.10.0.2
tzdata==2022.1
tzlocal==4.2
ua-parser==0.18.0
UNKNOWN==0.0.0
uritemplate==3.0.0
urllib3==1.22
user-agents==2.2.0
vine==5.0.0
virtualenv==20.17.1
virtualenv-clone==0.3.0
virtualenvwrapper==4.8.2
wcwidth==0.2.5
websocket-client==1.2.1
Werkzeug==0.14.1
win10toast==0.9
WTForms==3.0.0
xadmin-py3==2.0.4
xlrd==2.0.1
XlsxWriter==3.0.2
xlutils==2.0.0
xlwings==0.26.3
xlwt==1.3.0
xmltodict==0.13.0
zipp==3.6.0
zope.event==4.6
zope.interface==4.6.0
D:\program\Python36-32\python3.exe "D:\program\pycharm2021\pycharm2021\PyCharm 2021.1.3\plugins\python\helpers\pydev\pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 54959 --file D:/中研项目代码/flask_jincheng/manager.py runserver --host=192.168.3.10 --port=5000
Connected to pydev debugger (build 211.7628.24)
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta charset="utf-8"/>
<meta name="SiteName" content="&#26187;&#22478;&#24066;&#25237;&#36164;&#20419;&#36827;&#20013;&#24515;"/>
<meta name="SiteDomain" content="zsj.jcgov.gov.cn"/>
<meta name="SiteIDCode" content="1405000016"/>
<meta name="ColumnName" content="&#32508;&#21512;&#20449;&#24687;"/>
<meta name="ColumnType" content="&#32508;&#21512;&#20449;&#24687;"/>
<meta name="ArticleTitle" content="&#25171;&#36896;&#19987;&#19994;&#22242;&#38431; &#25552;&#21319;&#25307;&#21830;&#36136;&#25928; &#20197;&#39640;&#36136;&#37327;&#25307;&#21830;&#24178;&#37096;&#38431;&#20237;&#20419;&#26187;&#22478;&#39640;&#36136;&#37327;&#21457;&#23637;"/>
<meta name="PubDate" content="2023-03-24 14:50:00"/>
<meta name="ContentSource" content="&#26412;&#31449;&#32534;&#36753;"/>
<meta name="Keywords" content=""/>
<meta name="Author" content=""/>
<meta name="Description" content=""/>
<meta name="Url" content=""/>
<meta name="ColumnDescription" content="&#32508;&#21512;&#20449;&#24687;"/>
<meta name="ColumnKeywords" content="&#32508;&#21512;&#20449;&#24687;"/>
<title>&#26187;&#22478;&#24066;&#25237;&#36164;&#20419;&#36827;&#20013;&#24515;</title>
<link href="../../../images/css.css" rel="stylesheet" type="text/css"/>
<script type="text/JavaScript"> function MM_swapImgRestore() { var i,x,a=document.MM_sr; for(i=0;a&amp;&amp;i&lt;a.length&amp;&amp;(x=a[i])&amp;&amp;x.oSrc;i++) x.src=x.oSrc; } function MM_preloadImages() { var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i&lt;a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_findObj(n, d) { var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))&gt;0&amp;&amp;parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&amp;&amp;d.all) x=d.all[n]; for (i=0;!x&amp;&amp;i&lt;d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&amp;&amp;d.layers&amp;&amp;i&lt;d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x &amp;&amp; d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i&lt;(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } </script>
<style type="text/css">
.news_nr *{
font-size: 16px;
}
</style>
</head>
<body>
<script type="text/JavaScript"> function MM_preloadImages() { var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i&lt;a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } </script>
<script> function closecd(id){ document.getElementById("cd_"+id).style.display = "none" ; } function showcd(id){ document.getElementById("cd_"+id).style.display = "block" ; } </script>
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
<tbody>
<tr style="position: relative;">
<td width="279"><a href="/"><img ignore="true" src="/images/logo.jpg" border="0"/></a></td>
<td width="721" align="right" valign="bottom">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="620" height="122">
<param name="movie" value="/images/top.swf"/>
<param name="quality" value="high"/>
<param name="wmode" value="transparent"/>
<embed src="/images/top.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="620" height="122" ignore="true">
</embed></object>
</td>
<td class="wza">
<a href="javascript:void(0);" title="&#26080;&#38556;&#30861;" id="cniil_wza">&#26080;&#38556;&#30861;</a>
</td>
</tr>
</tbody>
</table>
<style type="text/css">
.nav_item_text{
position: absolute;
top: -23px;
left: 13px;
font-size: 16px;
color: white;
}
.relative{
position: relative;
}
</style>
<table width="100%" height="48" border="0" cellpadding="0" cellspacing="0" background="/images/menu_bg.gif" ignore="true">
<tbody>
<tr>
<td style="position: relative;">
<div style="position: relative; margin: 0px auto; width: 1000px; " align="left">
<div class="caidan">
<div id="cd_1" onmouseover="showcd(1)" onmouseout="closecd(1)" style="display: none;">
<div>
<div>
<a class="relative" href="http://zsj.jcgov.gov.cn/jcgk/">
<img ignore="true" src="/images/nav_item_active.png" border="0"/>
<span class="nav_item_text">&#24066;&#24773;&#31616;&#20171;</span>
</a>
</div>
<div class="dhlist dh_bg6">
<a href="http://zsj.jcgov.gov.cn/jcgk/jcsq/">&#26187;&#22478;&#24066;&#24773;</a>
<a href="http://zsj.jcgov.gov.cn/jcgk/jjsl/">&#32463;&#27982;&#23454;&#21147;</a>
<a href="http://zsj.jcgov.gov.cn/jcgk/fzgh/">&#21457;&#23637;&#35268;&#21010;</a>
</div>
</div>
</div>
<div id="cd_2" onmouseover="showcd(2)" onmouseout="closecd(2)" style="display: none;">
<div>
<div>
<a class="relative" href="http://zsj.jcgov.gov.cn/tzdx/">
<img ignore="true" src="/images/nav_item_active.png" border="0"/>
<span class="nav_item_text">&#25237;&#36164;&#23548;&#21521;</span>
</a>
</div>
<div class="dhlist dh_bg6">
<a href="http://zsj.jcgov.gov.cn/tzdx/tzys/">&#25237;&#36164;&#35201;&#32032;</a>
<a href="http://zsj.jcgov.gov.cn/tzdx/bszn/">&#21150;&#20107;&#25351;&#21335;</a>
<a href="http://zsj.jcgov.gov.cn/tzdx/fjxz/">&#38468;&#20214;&#19979;&#36733;</a>
</div>
</div>
</div>
<div id="cd_6" onmouseover="showcd(6)" onmouseout="closecd(6)">
<div>
<div>
<a class="relative" href="#">
<img ignore="true" src="/images/nav_item_active.png" border="0"/>
<span class="nav_item_text">&#21306;&#22495;&#25307;&#21830;</span>
</a>
</div>
<div class="dhlist dh_bg2">
<a href="http://www.qinshui.gov.cn/">&#27777;&#27700;</a>
<a href="http://www.lczf.gov.cn/">&#38517;&#24029;</a>
<a href="http://www.yczf.gov.cn/">&#38451;&#22478;</a>
<a href="http://www.sxgp.gov.cn/">&#39640;&#24179;</a>
<a href="http://www.zezhou.gov.cn/">&#27901;&#24030;</a>
<a href="http://www.jccq.gov.cn/mlhkt/">&#22478;&#21306;</a>
</div>
</div>
</div>
<!-- <div id="cd_7" onmouseover="showcd(7)" onmouseout="closecd(7)"> <div> <div><a href="http://zsj.jcgov.gov.cn/xmzt/1.html"><img IGNORE="true" src="/images/xldh_7.jpg" border="0" /></a></div> <div class="dhlist dh_bg6"> <a href="http://zsj.jcgov.gov.cn/xmzt/1.html">&#31614;&#32422;&#39033;&#30446;</a> <a href="http://zsj.jcgov.gov.cn/xmzt/2.html">&#33853;&#22320;&#39033;&#30446;</a> <a href="http://zsj.jcgov.gov.cn/xmzt/3.html">&#24320;&#24037;&#39033;&#30446;</a> </div> </div> </div> <div id="cd_8" onmouseover="showcd(8)" onmouseout="closecd(8)"> <div> <div><a href="http://zsj.jcgov.gov.cn/tzjy/jzxx.html"><img IGNORE="true" src="/images/xldh_8.jpg" border="0" /></a></div> <div class="dhlist dh_bg1"> <a href="http://zsj.jcgov.gov.cn/tzjy/jzxx.html">&#23616;&#38271;&#20449;&#31665;</a> </div> </div> </div> -->
<div id="cd_9" onmouseover="showcd(9)" onmouseout="closecd(9)">
<div>
<div>
<a class="relative" href="http://zsj.jcgov.gov.cn/jggk/">
<img ignore="true" src="/images/nav_item_active.png" border="0"/>
<span class="nav_item_text">&#26426;&#26500;&#27010;&#20917;</span>
</a>
</div>
<div class="dhlist dh_bg1">
<a href="http://zsj.jcgov.gov.cn/jggk/bmzz/">&#37096;&#38376;&#32844;&#36131;</a>
<a href="http://zsj.jcgov.gov.cn/jggk/ldxx/">&#39046;&#23548;&#20449;&#24687;</a>
<a href="http://zsj.jcgov.gov.cn/jggk/nsjg/">&#20869;&#35774;&#26426;&#26500;</a>
<a href="http://zsj.jcgov.gov.cn/jggk/lxwm/">&#32852;&#31995;&#25105;&#20204;</a>
</div>
</div>
</div>
</div>
</div>
<table width="1000" height="48" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">
<tbody>
<tr>
<td>
<img ignore="true" src="/images/menu_01.jpg" width="10" height="48" alt=""/>
</td>
<td>
<a class="relative" href="/" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image15','','/images/nav_item_active_clean.png',1)">
<img ignore="true" src="/images/nav_item.png" name="Image15" width="90" height="48" border="0" id="Image15"/>
<span class="nav_item_text">&#32593;&#31449;&#39318;&#39029;</span>
</a>
</td>
<td>
<a class="relative" href="http://zsj.jcgov.gov.cn/jcgk/" onmouseover="showcd(1)" onmouseout="closecd(1)">
<img ignore="true" src="/images/nav_item.png" name="Image16" width="89" height="48" border="0" id="Image16"/>
<span class="nav_item_text">&#24066;&#24773;&#31616;&#20171;</span>
</a>
</td>
<td>
<a class="relative" href="http://zsj.jcgov.gov.cn/tzdx/" onmouseover="showcd(2)" onmouseout="closecd(2)">
<img ignore="true" src="/images/nav_item.png" name="Image17" width="89" height="48" border="0" id="Image17"/>
<span class="nav_item_text">&#25237;&#36164;&#23548;&#21521;</span>
</a>
</td>
<td>
<a class="relative" href="http://zsj.jcgov.gov.cn/jggk/" onmouseover="showcd(9)" onmouseout="closecd(9)">
<img ignore="true" src="/images/nav_item.png" name="Image25" width="89" height="48" border="0" id="Image25"/>
<span class="nav_item_text">&#26426;&#26500;&#27010;&#20917;</span>
</a>
</td>
<td>
<a class="relative" href="http://zsj.jcgov.gov.cn/xmtj/" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image18','','/images/nav_item_active_clean.png',1)">
<img ignore="true" src="/images/nav_item.png" name="Image18" width="89" height="48" border="0" id="Image18"/>
<span class="nav_item_text">&#39033;&#30446;&#25512;&#20171;</span>
</a>
</td>
<td>
<a class="relative" href="http://zsj.jcgov.gov.cn/sjtb/sjtb/" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image20','','/images/nav_item_active_clean.png',1)">
<img ignore="true" src="/images/nav_item.png" name="Image20" width="90" height="48" border="0" id="Image20"/>
<span class="nav_item_text">&#25968;&#25454;&#36890;&#25253;</span>
</a>
</td>
<td>
<a class="relative" href="/" onmouseover="showcd(6)" onmouseout="closecd(6)">
<img ignore="true" src="/images/nav_item.png" name="Image21" width="88" height="48" border="0" id="Image21"/>
<span class="nav_item_text">&#21306;&#22495;&#25307;&#21830;</span>
</a>
</td>
<td>
<a class="relative" href="http://zsj.jcgov.gov.cn/hdzx/" target="_blank" onmouseover="MM_swapImage('Image23','','/images/nav_item_active_clean.png',1)" onmouseout="MM_swapImgRestore()">
<img ignore="true" src="/images/nav_item.png" name="Image23" width="90" height="48" border="0" id="Image23"/>
<span class="nav_item_text">&#20114;&#21160;&#20013;&#24515;</span>
</a>
</td>
<td>
<a class="relative" href="http://zsj.ddo.cn/xxsj" target="_blank" onmouseover="MM_swapImage('Image24','','/images/nav_item_active_clean.png',1)" onmouseout="MM_swapImgRestore()">
<img ignore="true" src="/images/nav_item.png" name="Image24" width="88" height="48" border="0" id="Image24"/>
<span class="nav_item_text">&#20449;&#24687;&#25910;&#38598;</span>
</a>
<a class="relative" href="http://jc.sxzwfw.gov.cn/icity/icity/departmental_matters" target="_blank" onmouseover="MM_swapImage('Image24','','/images/nav_item_active_clean.png',1)" onmouseout="MM_swapImgRestore()">
<img ignore="true" src="/images/nav_item.png" name="Image24" width="88" height="48" border="0" id="Image24"/>
<span class="nav_item_text">&#25919;&#21153;&#26381;&#21153;</span>
</a>
</td>
<td>
<img ignore="true" src="/images/menu_13.jpg" width="10" height="48" alt=""/>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="margin-top:10px;">
<tbody>
<tr>
<td valign="top" style="padding:10px;">
<div class="location2">
&#24403;&#21069;&#20301;&#32622;&#65306;<a href="../../../" title="&#39318;&#39029;" class="CurrChnlCls">&#39318;&#39029;</a>&#160;&gt;&gt;&#160;<a href="../../" title="&#26032;&#38395;&#21160;&#24577;" class="CurrChnlCls">&#26032;&#38395;&#21160;&#24577;</a>&#160;&gt;&gt;&#160;<a href="../" title="&#32508;&#21512;&#20449;&#24687;" class="CurrChnlCls">&#32508;&#21512;&#20449;&#24687;</a>
</div>
<div class="showCon">
<h1>
&#25171;&#36896;&#19987;&#19994;&#22242;&#38431; &#25552;&#21319;&#25307;&#21830;&#36136;&#25928; &#20197;&#39640;&#36136;&#37327;&#25307;&#21830;&#24178;&#37096;&#38431;&#20237;&#20419;&#26187;&#22478;&#39640;&#36136;&#37327;&#21457;&#23637;
</h1>
<div style="text-align:center;" class="xxly">
&#26469;&#28304;&#65306;&#26412;&#31449;&#32534;&#36753;
&#21457;&#24067;&#26102;&#38388;&#65306;2023-03-24
</div>
</div>
<div class="showCon">
<article id="zoom">
<div class="showConA news_nr">
<div class="view TRS_UEDITOR trs_paper_default trs_web">
<p style="margin: 0px; text-align: justify; line-height: 1.5em; text-indent: 0em; -ms-text-autospace: ideograph-numeric; -ms-text-justify: inter-ideograph;"/>
<p style="margin: 0px; text-align: justify; text-indent: 0em; -ms-text-autospace: ideograph-numeric; -ms-text-justify: inter-ideograph;">
<span style="font-family: &#20223;&#23435;; font-size: 21px;">&#8194;<span style="font-family: &#20223;&#23435;; font-size: 20px;" data-index="7">&#8194;&#8194;&#20026;&#28145;&#20837;&#36143;&#24443;&#33853;&#23454;&#29579;&#38663;&#20070;&#35760;&#22312;&#8220;&#24066;&#31649;&#20027;&#35201;&#39046;&#23548;&#24178;&#37096;&#23398;&#20064;&#36143;&#24443;&#20826;&#30340;&#20108;&#21313;&#22823;&#31934;&#31070;&#19987;&#39064;&#30740;&#35752;&#29677;&#8221;&#19978;&#20851;&#20110;&#25171;&#36896;&#8220;&#19977;&#26080;&#8221;&#8220;&#19977;&#21487;&#8221;&#33829;&#21830;&#29615;&#22659;&#30340;&#37325;&#35201;&#35762;&#35805;&#31934;&#31070;&#12290;&#24066;&#25237;&#36164;&#20419;&#36827;&#20013;&#24515;&#32858;&#28966;&#8220;&#24378;&#22522;&#30784;&#12289;&#22266;&#26681;&#26412;&#65292;&#34917;&#30701;&#26495;&#12289;&#20419;&#25552;&#21319;&#8221;&#30340;&#24635;&#20307;&#30446;&#26631;&#65292;&#32452;&#32455;&#24066;&#30452;&#30456;&#20851;&#37096;&#38376;&#21450;&#21439;&#65288;&#24066;&#12289;&#21306;&#65289;&#25307;&#21830;&#24178;&#37096;&#21442;&#21152;&#8220;&#26187;&#22478;&#24066;&#25307;&#21830;&#24341;&#36164;&#32032;&#36136;&#33021;&#21147;&#25552;&#21319;&#22521;&#35757;&#29677;&#8221;&#65292;&#30528;&#21147;&#25552;&#21319;&#25307;&#21830;&#24178;&#37096;&#32508;&#21512;&#33021;&#21147;&#21644;&#25307;&#21830;&#27700;&#24179;&#65292;&#20197;&#39640;&#36136;&#37327;&#20154;&#25165;&#38431;&#20237;&#24320;&#25299;&#25307;&#21830;&#24341;&#36164;&#26032;&#25104;&#25928;&#65292;&#25512;&#21160;&#26187;&#22478;&#39640;&#36136;&#37327;&#12289;&#36328;&#36234;&#24335;&#21457;&#23637;&#36808;&#19978;&#26032;&#21488;&#38454;&#12290;<br/>&#8194;&#8194;&#8194;&#8194;&#22521;&#35757;&#29677;&#20110;3&#26376;22&#26085;&#22312;&#26477;&#24030;&#25289;&#24320;&#24119;&#24149;&#65292;&#36992;&#35831;&#19994;&#20869;5&#21517;&#30693;&#21517;&#19987;&#23478;&#23398;&#32773;&#65292;&#37325;&#28857;&#22260;&#32469;&#25307;&#21830;&#39033;&#30446;&#20449;&#24687;&#25366;&#25496;&#12289;&#39033;&#30446;&#31574;&#21010;&#21253;&#35013;&#12289;&#25512;&#20171;&#23454;&#21153;&#20132;&#27969;&#31561;&#26041;&#38754;&#20869;&#23481;&#65292;&#36827;&#34892;&#20026;&#26399;3&#22825;&#30340;&#25480;&#35838;&#12290;&#27492;&#27425;&#22521;&#35757;&#19968;&#25913;&#20256;&#32479;&#35838;&#22530;&#8220;&#35762;&#29702;&#35770;&#8221;&#20026;&#20027;&#30340;&#21333;&#19968;&#24418;&#24335;&#65292;&#35774;&#32622;&#19987;&#39064;&#30740;&#35752;&#12289;&#32463;&#39564;&#20132;&#27969;&#12289;&#23454;&#21153;&#35299;&#26512;&#12289;&#22478;&#24066;&#36335;&#28436;&#12289;&#29616;&#22330;&#25945;&#23398;&#31561;&#8220;&#22810;&#26679;&#21270;&#8221;&#23454;&#36341;&#29615;&#33410;&#65292;&#36890;&#36807;&#8220;&#35762;&#23398;&#12289;&#30740;&#23398;&#12289;&#36187;&#23398;&#12289;&#26194;&#23398;&#8221;&#31561;&#24418;&#24335;&#65292;&#24403;&#38754;&#20256;&#25480;&#32463;&#39564;&#12289;&#29616;&#22330;&#31572;&#30097;&#35299;&#24785;&#12289;&#30331;&#21488;&#20132;&#27969;&#27604;&#27494;&#12289;&#23454;&#22320;&#36208;&#35775;&#23454;&#36341;&#65292;&#33829;&#36896;&#20102;&#35265;&#36132;&#24605;&#40784;&#12289;&#27604;&#23398;&#36214;&#36229;&#30340;&#27987;&#21402;&#27675;&#22260;&#65292;&#26377;&#25928;&#25552;&#21319;&#20102;&#22521;&#35757;&#30340;&#38024;&#23545;&#24615;&#21644;&#23454;&#25928;&#24615;&#12290;<br/>&#8194;&#8194;&#8194;&#8194;&#36890;&#36807;&#19977;&#22825;&#30340;&#22521;&#35757;&#65292;&#21442;&#35757;&#23398;&#21592;&#19968;&#33268;&#34920;&#31034;&#65292;&#20540;&#27492;&#36716;&#22411;&#21457;&#23637;&#30340;&#20851;&#38190;&#20043;&#38469;&#65292;&#22521;&#35757;&#29677;&#20030;&#21150;&#27491;&#24403;&#20854;&#26102;&#65292;&#20869;&#23481;&#32039;&#36319;&#28526;&#27969;&#12289;&#30452;&#22868;&#20027;&#39064;&#65292;&#24418;&#24335;&#20016;&#23500;&#26032;&#39062;&#12289;&#23507;&#25945;&#20110;&#20048;&#65292;&#35753;&#22823;&#23478;&#20174;&#35299;&#35835;&#25919;&#31574;&#31934;&#31070;&#65292;&#25512;&#21160;&#25442;&#20301;&#24605;&#32771;&#12289;&#20102;&#35299;&#20225;&#19994;&#38656;&#27714;&#12289;&#25299;&#23485;&#25307;&#21830;&#28192;&#36947;&#12289;&#23547;&#27714;&#36164;&#37329;&#25903;&#25345;&#12289;&#24378;&#21270;&#22478;&#24066;&#26631;&#31614;&#12289;&#21152;&#28145;&#21697;&#29260;&#21360;&#35760;&#20013;&#23398;&#21040;&#20102;&#35768;&#22810;&#26032;&#30693;&#35782;&#12289;&#33719;&#24471;&#20102;&#26032;&#24605;&#36335;&#12289;&#26032;&#26041;&#27861;&#65292;&#21487;&#35859;&#33719;&#30410;&#21290;&#27973;&#12290;<br/>&#8194;&#8194;&#8194;&#36890;&#36807;&#22521;&#35757;&#65292;&#22823;&#23478;&#35748;&#20026;&#20316;&#20026;&#25307;&#21830;&#20154;&#21592;&#65292;&#22521;&#35757;&#24212;&#24403;&#24120;&#25235;&#24120;&#26032;&#12289;&#25193;&#22823;&#33539;&#22260;&#12289;&#25552;&#39640;&#39057;&#27425;&#65292;&#20026;&#20805;&#20998;&#25552;&#39640;&#25307;&#21830;&#24178;&#37096;&#38431;&#20237;&#30340;&#20010;&#20154;&#32508;&#21512;&#32032;&#36136;&#12289;&#25307;&#21830;&#24341;&#36164;&#33021;&#21147;&#12289;&#25512;&#20171;&#20132;&#27969;&#27700;&#24179;&#25171;&#19979;&#26681;&#22522;&#65292;&#20026;&#25512;&#21160;&#39640;&#36136;&#37327;&#21457;&#23637;&#21402;&#26893;&#20154;&#25165;&#27779;&#22303;&#12290;</span></span></p><p/></div>
</div>
</article>
</div>
<script> function doZoom(size) { document.getElementById('zoom').style.fontSize = size + 'px' } </script>
</td>
</tr>
</tbody>
</table>
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:12px;">
<tbody>
<tr>
<td>
<a href="http://zsj.jcgov.gov.cn/yqlj/yqlj/">
<img ignore="true" src="/images/index_yqlj.jpg" width="1000" height="42" border="0"/>
</a>
</td>
</tr>
<tr>
<td height="90" valign="top" class="index_news_bor">
<div class="di_yqlj">
<a href="http://www.jcnews.com.cn/">&#26187;&#22478;&#26032;&#38395;&#32593;</a>
<a href="http://www.jcgov.gov.cn/">&#26187;&#22478;&#24066;&#20154;&#27665;&#25919;&#24220;</a>
<a href="http://www.shanxiinvest.com/">&#23665;&#35199;&#30465;&#25237;&#36164;&#20419;&#36827;&#23616;</a>
<a href="http://www.ccpit-sx.org/">&#23665;&#35199;&#30465;&#36152;&#20419;&#20250;</a>
<a href="http://www.zhaoshang-sh.com/">&#19978;&#28023;&#25307;&#21830;&#32593;</a>
<a href="http://www.zhaoshang.net/">&#20013;&#22269;&#25307;&#21830;&#32593;</a>
<a href="http://www.cnipai.com/">&#20013;&#22269;&#22253;&#21306;&#25307;&#21830;&#32593;</a>
<a href="http://www.jrj.com.cn/">&#37329;&#34701;&#30028;</a>
<a href="http://hzjl.tj.gov.cn/">&#22825;&#27941;&#24066;&#21512;&#20316;&#20132;&#27969;&#21150;</a>
<a href="http://opinion.people.com.cn/">&#20154;&#27665;&#32593;&#35266;&#28857;&#39057;&#36947;</a>
</div>
</td>
</tr>
</tbody>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="di_copy">
<tbody>
<tr>
<td height="160" align="center">
<a href="/">&#32593;&#31449;&#39318;&#39029;</a>
| <a href="http://zsj.jcgov.gov.cn/jcgk/">&#24066;&#24773;&#31616;&#20171;</a>
| <a href="http://zsj.jcgov.gov.cn/tzdx/">&#25237;&#36164;&#23548;&#21521;</a>
| <a href="http://zsj.jcgov.gov.cn/jggk/">&#26426;&#26500;&#27010;&#20917;</a>
| <a href="http://zsj.jcgov.gov.cn/xmtj/">&#39033;&#30446;&#25512;&#20171;</a>
| <a href="http://zsj.jcgov.gov.cn/sjtb/sjtb/">&#25968;&#25454;&#36890;&#25253;</a>
| <a href="http://zsj.jcgov.gov.cn/hdzx/">&#20114;&#21160;&#20013;&#24515;</a>
| <a href="http://zsj.jcgov.gov.cn/jggk/lxwm/">&#32852;&#31995;&#25105;&#20204;</a>
| <a href="http://zsj.jcgov.gov.cn/wzdt/">&#32593;&#31449;&#22320;&#22270;</a>
<br/>
&#26187;&#22478;&#24066;&#25237;&#36164;&#20419;&#36827;&#20013;&#24515; &#29256;&#26435;&#25152;&#26377; &#22320;&#22336;&#65306;&#26187;&#22478;&#24066;&#22478;&#21306;&#27901;&#24030;&#36335;1019&#21495;<br/>
&#22791;&#26696;&#24207;&#21495;&#65306;<a href="http://beian.miit.gov.cn/">&#26187;ICP&#22791;05001036&#21495;</a>
<a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=14050002000705">
<img ignore="true" src="/images/ghs.png"/>
<span style="height:20px;line-height:20px;color:#666666;">&#26187;&#20844;&#32593;&#23433;&#22791; 14050002000705&#21495;</span>
</a>
&#32593;&#31449;&#26631;&#35782;&#30721;:1405000016
<br/>
<table width="200" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="140"><script id="_jiucuo_" sitecode="1405000016" src="https://zfwzgl.www.gov.cn/exposure/jiucuo.js" ignore="true"/></td>
<td align="center" valign="middle">
<span id="_ideConac">
<a href="http://bszs.conac.cn/sitename?method=show&amp;id=0A65DF4FAC04654FE053022819AC9EA5" target="_blank">
<img id="imgConac" vspace="0" hspace="0" border="0" ignore="true" src="/images/blue.png" data-bd-imgshare-binded="1"/>
</a>
</span>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<script type="text/javascript" src="./images/security.js"/>
<script id="_trs_ta_js" src="//ta.trs.cn/c/js/ta.js?mpid=4622" async="async" defer="defer"/>
<script defer="defer" async="" type="text/javascript" src="https://api.govwza.cn/cniil/assist.js?sid=1406&amp;pos=left" ignore="true"/>
</body>
</html>
import pandas as pd
# 链接数据库
import pymysql
"""# 第一列是产业链名称和id单独保存,用作匹配完成后的赋值
# 第二列读取到二级产业,然后遍历企业表去匹配企业“企业名称”、“所属行业”、“经营范围”、“企业简介”、“主营产品”
# 如果匹配到了,就把二级产业进行保存,然后读取第三列的三级产业去匹配,以此类推
# 如果为空pass,读取下一个产业链数据
# 如果有值把产业环节列表的数据填充到product_all,把产业链id保存到列表里"""
class ChainTag:
def __init__(self):
self.db = pymysql.connect(
host='rm-8vbn50m65w332c23aso.mysql.zhangbei.rds.aliyuncs.com',
user='root',
password='Root@2020',
db='industry_chain_online',
charset='utf8'
)
self.cur = self.db.cursor()
# 获取某个产业链的id
def get_chain_id(self, chain_name):
try:
sql = "SELECT nid FROM navigation WHERE name='{}';".format(chain_name)
self.cur.execute(sql)
chain_id = self.cur.fetchone()
return chain_id[0]
except:
return ''
# 合并要匹配的企业的相关字段,然后匹配
def get_company_info(self, com_id):
try:
sql = 'SELECT company_name,company_industry,business_scope,short_info FROM `enterprise` WHERE id={};'.format(com_id)
self.cur.execute(sql)
company_name, company_industry, business_scope, short_info = self.cur.fetchone()
info = company_name + company_industry + business_scope + short_info
return info
except:
return ''
def match_indu(self, indu_li, chain_id_li, indu_name, company_info, chain_id):
try:
# 拿产业名称模糊匹配
if indu_name and indu_name in company_info: # 如果匹配上保存环节名称和产业链id,跳出该产业链表读取下一个产业链文件
indu_li.append(indu_name)
if chain_id not in chain_id_li:
chain_id_li.append(chain_id)
return True
return False
except:
return False
def read_excel(self, i):
# 读取产业词表
path_li = ['产业链文件/硬质合金(处理后).xlsx', '产业链文件/不锈钢(处理后).xlsx']
data = pd.read_excel(path_li[i])
return data
def make_tag(self, company_info):
chain_name1 = ''
excel_id = 0
chain_id_li = []
while True:
if excel_id > 1: # 文件遍历结束,该企业匹配结束,进行打标
sql = "UPDATE `enterprise` SET indu_id_list='{}' WHERE id={};".format(chain_id_li, com_id)
self.cur.execute(sql)
self.db.commit()
break
chain_id = ''
indu_li = []
data = self.read_excel(excel_id)
for i in range(len(data)):
chain_name = data.loc[i, "一级实体"] # 获取产业链名称
if chain_name != chain_name1: # 避免重复获取产业链id
chain_id = self.get_chain_id(chain_name) # 获取产业链id并保存
if not chain_id:
print('{} 产业链不存在,请核实!'.format(chain_name))
excel_id += 1
break
chain_name1 = chain_name
pass
# 获取第二列的下级产业链
indu_name = data.loc[i, "二级实体"] # 获取产业链名称
# # 合并要匹配的企业的相关字段,然后匹配
# 拿产业名称模糊匹配
res = self.match_indu(indu_li, chain_id_li, indu_name, company_info, chain_id)
if res:
break # 跳出当前产业链,匹配下一个文件的产业链
# 如果没有匹配上就循环下一级进行匹配
indu_name = data.loc[i, "三级实体"] # 获取产业链名称
res = self.match_indu(indu_li, chain_id_li, indu_name, company_info, chain_id)
if res:
break # 跳出当前产业链,匹配下一个文件的产业链
indu_name = data.loc[i, "四级实体"] # 获取产业链名称
res = self.match_indu(indu_li, chain_id_li, indu_name, company_info, chain_id)
if res:
break # 跳出当前产业链,匹配下一个文件的产业链
indu_name = data.loc[i, "五级实体"] # 获取产业链名称
res = self.match_indu(indu_li, chain_id_li, indu_name, company_info, chain_id)
if res:
break # 跳出当前产业链,匹配下一个文件的产业链
# 如果产业匹配结束,indu_li为空,说明没有匹配上,跳出当前产业链,匹配下一个文件的产业链
excel_id += 1
continue
if __name__ == '__main__':
chain = ChainTag()
# 合并要匹配的企业的相关字段,然后匹配
com_id = 16
while True:
com_id += 1
company_info = chain.get_company_info(com_id)
company_info = '钨矿开采北京新源博艺文化发展有限公司其他体育组织文化艺术交流活动(不含演出);模型设计;产品设计;销售教学用模型、模具;电子产品、通讯设备、计算机软硬件及外围设备、五金交电(不含电动自行车)、建筑材料、机械设备、化工产品(不含危险化学品)、塑料制品、服装鞋帽、金属制品、矿产品、钢材、家具;技术推广服务;园林绿化服务;承办展览展示;工程设计。(企业依法自主选择经营项目,开展经营活动;依法须经批准的项目,经相关部门批准后依批准的内容开展经营活动;不得从事本市产业政策禁止和限制类项目的经营活动。)北京新源博艺文化发展有限公司 我公司是一家专业从事军事礼品及高精密仿真模型研发、生产、销售集一体的综合企业。公司座落于北京中关村科技园区上地信息产业基地东。公司有近10年从事军事模型、军事礼品、军事纪念品设计、研发、生产制造经验。 公司自设生产基地位于河北省霸州市厂房占地1500多平米,配备了全套的模型模具加工设备及流水装配生产线。 秉承企业“传承精工品质”的核心理念,不断吸纳更多专业人才和成熟管理模式。“艰苦坚实、诚信承诺、实干实效”:以艰苦的作风打拼坚实的企业基础;以诚实的信念承诺一流的企业服务;实干的精神创造高效的企业来服务我们的客户! 远大的理想,美好的明天,正是新源博艺前进的源动力,展望未来,新源博艺诚邀各界有识之士共同合作、携手并进,共创远大、美好的前程! 主营产品:仿真车模型、军事模型、军事礼品、军事纪念品、导弹车模型、飞机模型、坦克模型、军舰模型、航姆模型、部队礼品、退伍礼品、男士礼品、外事礼品、81军事模型'
if not company_info:
continue
chain.make_tag(company_info)
import os
import os
import json
import base64
import requests
import hashlib
from Crypto.Hash import SHA256
from Crypto.PublicKey import RSA
from Crypto.Signature import PKCS1_v1_5 as Signature_pkcs1_v1_5
class Signature:
'''
爱城市网扫码登录
https://open.icity24.cn/
'''
def __init__(self, params):
# self.url = "https://auth.icity24.cn/icity/auth2.0/token"
self.params = params
self.privetkey_file_path = os.path.dirname(os.path.dirname(__file__)) + "/utils/json/ty_rsa"
self.privetkey = self.read_privet_key()
self.unsign_data = self.generate_sign(self.params)
# 读取私钥
def read_privet_key(self):
with open(self.privetkey_file_path, mode="r", encoding="utf-8") as f:
privetkey = "".join(f.readlines()[1:-1])
privetkey = privetkey.encode(encoding='utf-8')
return privetkey
# HASH-sha256
def generate_sign(self, param):
'''生成hash'''
# 按ASCII拼接字符串
stringA = "&".join([f"{k}={param[k]}" for k in sorted(param)])
# SHA256加密
hash_sha256 = hashlib.sha256(stringA.encode('utf8')).hexdigest()
return hash_sha256
# 生成签名
def gen_sign(self, secret=None):
"""
生成签名:是直接读取私钥的方式和未加签的数据
:return: 签名数据
"""
rsaKey = RSA.importKey(base64.b64decode(self.privetkey), passphrase=secret)
signer = Signature_pkcs1_v1_5.new(rsaKey)
digest = SHA256.new()
digest.update(self.unsign_data.encode('utf8'))
sign = signer.sign(digest)
signature = base64.b64encode(sign)
return signature.decode()
'''1、获取token'''
appid = "fea79d4c-9906-408c-86a5-8a092fda49b3"
code = "c417598b-5892-4217-81be-c3b6080e9fa1"
# code换取token
params = {
'appid': appid, # 爱城市网appID
'code': code, # 授权成功后产生的code
'grant_type': "authorization_code"
}
# 获取签名sign
s = Signature(params)
sign_value = s.gen_sign()
params["sign"] = sign_value
# 认证获取token
resp = requests.post(url="https://auth.icity24.cn/icity/auth2.0/token", data=params)
resp = json.loads(resp.text)
token = resp["token"]
'''2、token获取baseinfo'''
params = {
'appid': appid, # 爱城市网appID
'auth_token': token, # token
}
# 获取新签名sign
s = Signature(params)
sign_value = s.gen_sign()
params["sign"] = sign_value
# 获取基本信息
resp = requests.post(url="https://auth.icity24.cn/icity/auth2.0/get_base_info", data=params)
resp = json.loads(resp.text)
mobile_phon = resp["mobile_phon"] # 手机号
import os
import os
import json
import base64
import requests
import hashlib
from Crypto.Hash import SHA256
from Crypto.PublicKey import RSA
from Crypto.Signature import PKCS1_v1_5 as Signature_pkcs1_v1_5
"""
function 2:
openssl genrsa -out ./myPrivateKey.pem -passout pass:"密码" -des3 2048
openssl rsa -pubout -in ./myPrivateKey.pem -passin pass:"密码" -out ./myPublicKey.pem
"""
def gen_sig_(unsign_data, secret):
"""
两种方式生成签名:
这是第一种
1. 打开文件方式,见所有被注释的部分,文件为.pem
2. passphrase 的参数为文件加密的密码
:return: 签名数据
"""
path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
doc = os.path.join(path, 'myPrivateKey.pem')
with open(doc) as pk:
key_data = pk.read()
rsaKey = RSA.importKey(key_data, passphrase="密码")
signer = Signature_pkcs1_v1_5.new(rsaKey)
digest = SHA256.new()
digest.update(unsign_data.encode('utf8'))
sign = signer.sign(digest)
signature = base64.b64encode(sign)
print(signature)
return signature
def verify_sign_(data, sign, secret):
"""
读取公钥文件,验签
"""
path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
doc = os.path.join(path, 'myPrivateKey.pem')
with open(doc) as pk:
key_data = pk.read()
rsaKey = RSA.importKey(key_data, passphrase=b'mima')
verifier = Signature_pkcs1_v1_5.new(rsaKey)
digest = SHA256.new()
digest.update(data.encode('utf8'))
is_verify = verifier.verify(digest, base64.b64decode(sign))
print(is_verify)
return is_verify
def gen_sign(private_key, unsign_data, secret):
"""
两种方式生成签名:
1. 是直接读取私钥的方式和未加签的数据
:return: 签名数据
"""
rsaKey = RSA.importKey(base64.b64decode(private_key), passphrase=secret)
signer = Signature_pkcs1_v1_5.new(rsaKey)
digest = SHA256.new()
digest.update(unsign_data.encode('utf8'))
sign = signer.sign(digest)
signature = base64.b64encode(sign)
return signature.decode()
def verify_sign(pubkey, data, sign, secret):
"""
直接传公钥方式
"""
rsaKey = RSA.importKey(base64.b64decode(pubkey), passphrase=secret)
verifier = Signature_pkcs1_v1_5.new(rsaKey)
digest = SHA256.new()
digest.update(data.encode('utf8'))
is_verify = verifier.verify(digest, base64.b64decode(sign))
print(is_verify)
return is_verify
def generate_sign(param):
'''生成hash'''
stringA = "&".join([f"{k}={param[k]}" for k in sorted(param)])
# SHA256加密
hash_sha256 = hashlib.sha256(stringA.encode('utf8')).hexdigest()
return hash_sha256
if __name__ == '__main__':
# 读取私钥
with open("ty_rsa", mode="r", encoding="utf-8") as f:
privetkey = "".join(f.readlines()[1:-1])
privetkey = privetkey.encode(encoding='utf-8')
# 生成hash
params = {
'appid': "fea79d4c-9906-408c-86a5-8a092fda49b3", # 爱城市网appID
'code': "c417598b-5892-4217-81be-c3b6080e9fa1", # 授权成功后产生的code
'grant_type': "authorization_code"
}
hash_value = generate_sign(params)
# 签名
sign_value = gen_sign(privetkey, hash_value, None)
params["sign"] = sign_value
# 换取token
resp = requests.post(url="https://auth.icity24.cn/icity/auth2.0/token", data=params)
resp = json.loads(resp.text)
print(resp)
if resp["code"] != 1000:
print("验证失败")
-----BEGIN PRIVATE KEY-----
-----BEGIN PRIVATE KEY-----
MIICWgIBAAKBgQCbhcu70wIoXnVhhGimrJWaQ1y5M3F8oDM6maLSjiVmaN0Kc7AN
EFF+jOtiN3C0xNxyaAINxi0J53Az1ezYIsa83vfZT0J0W53LtDXmfJQkuTFF333Z
PFZheRQqDrH08mDEL2S/aLgll1GyrKYP8IEO39xvkEuoAHK1Qcsjb4VQiQIDAQAB
An8m4UwNqLLhZLvzpSaEhKDh7/U+V54HigVEoSQTf3XaJF0eP83DdlDpUlGGPFXw
20ZBU78vsluQHkvuqYyMfCUyrrTgZYCCUgguWt0nbdc8YcFKiXn2P8ki5pEzt4mV
UwGoWIB7WQ4wVscghwE+6uFhi+0IzW3C2eigg3jqDIUBAkEAwCuda9LRlZIn2PDQ
CvEB574BNcU3vvaRemK5WnZ/Iep23ENf0nyE2CLgELxcu4aY6vZSNvrUD2T9+Gub
PYd8HwJBAM8t/3nsA3vhok8XDUWoee18k36mopZiRT/hB5FGQl4aX+p+EDAVeytQ
9WNim4R5RD+rym92ktJfzZj50hxBnlcCQCPZfxqYT6T5iRl9gzInV9WlqpAfZJDp
aqZMOIvZw0nOdbINl5iqxhWUG/zDRwFs0KY0oY3EKT9d9cscN++4kL0CQQC33Ll6
SSL6YM67Y9jKde7m/QSkhFuMHGAahalCmtixTLTMlN3m3ll1op5zegJMOZaA7wNz
kgZQnucGGMcHfpB3AkAr249EUriJXa8MfzolpCq2aWD974vFOINgz7GMj+B/a0fO
jzQ9j/fWp7330spy1lllWuVSYyA2OuhiH7HZHSSg
-----END PRIVATE KEY-----
-----BEGIN PUBLIC KEY-----
-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCu8FSZc7KcJcHXXaUIkFBj59q8
SdFZ6lYwROzPpNh5dxNa0/Umcxfk7Wg/vHDmxN/4Nk/KzpuQjUhUYl8ot15ZQbEt
/0kmjlBtZQk5lno/6FxnRlK+OtqW3uCG6nPLTZNGOfzQsaSioXg5OfK3a1bIGXXX
NTSlC+xC0iGfury6sQIDAQAB
-----END PUBLIC KEY-----
# 爱城市网app,PC网站扫码登录指南
# 爱城市网app,PC网站扫码登录指南
''''''
'''1、app扫码授权'''
# 1、 打开认证界面(扫码界面),第三方需要在PC网站拼接地址,打开扫码页面。可以使用ifream形式,并自定义样式
# 具体请求如下:
# url(GET) https://new3.icity24.cn/platformcenter/scan-code-pc/index.html
# 参数
# 名字 类型 是否必需 最大长度 描述 示例
# app_id String 是 32 爱城市网分配给第三方应用的AppId fea79d4c-9906-408c-86a5-8a092fda49b3
# redirect_uri String 是 - 授权成功后回调页面,需转义,此url的域名必须和约定2中的一致 https://www.baidu.com?XXX=XXX
# scope String 是 - 接口权限值,多个以","分隔 base_info,auth_user
# Result 备注 用户授权成功后会跳转至开发者定义的回调页面,爱城市会在回调页面地址后面
# 拼接app_id,code,open_id,scope等参数。若用户取消授权,将关闭认证页面。
# 示例:https://auth.icity24.cn/icity/auth2.0/authorize?app_id=7f4ba7d2-0c44-4c65-866d-7f5e754360a3&redirect_uri=http%3A%2F%2Ftyzhaoshanggraph.industrychain.online&scope=base_info,auth_user
'''2、code -换取-> token'''
# 应用在拿到code之后应尽快去爱城市授权中心换取token, code过期时间为五分钟,过期将不可在用,且一个code只能使用一次。
# url(POST) https://auth.icity24.cn/icity/auth2.0/token
# 名字 类型 是否必需 最大长度 描述 示例
# app_id String 是 32 爱城市网分配给第三方应用的AppId fea79d4c-9906-408c-86a5-8a092fda49b3
# code String 是 32 授权成功后产生的code c417598b-5892-4217-81be-c3b6080e9fa1
# grant_type String 是 - authorization_code或者refresh_token,其中authorization_code代表使用code获取,refresh_token代表使用refresh_token authorization_code
# refresh_token String 是 - 当token过期时可用refresh_token刷新获取新token c417598b-5892-4217-81be-c3b6080e9fa1
# sign String 是 - 签名,具体签名规则见附录 VJMIgEqAIe6928LVvKC8VFHHZhmW0WHVfjqTZpN8H5fhOlB+raGnMZGfRfPhv+LfJ236mq/lCSKIS14uS0cc7PvBFLlX0ks//aLdPySzsdsziWWPsPh9Jt2Wu/Z/yrCRjK1Ev4PVbXmOw2PDvWti2e0pO0mscgOiwPTHKgAaL84=
# 签名算法
import hashlib
def generate_sign(param):
'''生成hash'''
stringA = "&".join([f"{k}={param[k]}" for k in sorted(param)])
# SHA256加密
hash_sha256 = hashlib.sha256(stringA.encode('utf8')).hexdigest()
return hash_sha256
params = {
'appid': "fea79d4c-9906-408c-86a5-8a092fda49b3", # 爱城市网appID
'code': "c417598b-5892-4217-81be-c3b6080e9fa1", # 授权成功后产生的code
'grant_type': "authorization_code"
}
print(generate_sign(params))
# RSASSA-PKCS1-V1_5-SIGN使用私钥对hash签名
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