4x/irrigation-water-demand-bac.../doc/增量脚本-1.3.2.txt

109 lines
6.2 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

ALTER TABLE t_platform ADD COLUMN `map_type` tinyint(3) DEFAULT NULL COMMENT '1-卫星地图 2-3D沙盘';
ALTER TABLE t_project_map_draw ADD COLUMN `start_long` decimal(9,6) DEFAULT NULL COMMENT '起点经度';
ALTER TABLE t_project_map_draw ADD COLUMN `start_lat` decimal(8,6) DEFAULT NULL COMMENT '起点纬度';
ALTER TABLE t_project_map_draw ADD COLUMN `end_long` decimal(9,6) DEFAULT NULL COMMENT '终点经度';
ALTER TABLE t_project_map_draw ADD COLUMN `end_lat` decimal(8,6) DEFAULT NULL COMMENT '终点纬度';
ALTER TABLE t_project ADD COLUMN `inflow_river_id` varchar(255) DEFAULT NULL COMMENT '来水河段,多个逗号隔开';
ALTER TABLE t_project ADD COLUMN `outflow_river_id` varchar(255) DEFAULT NULL COMMENT '排水河段,多个逗号隔开';
CREATE TABLE `t_project_extend_config` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`project_id` bigint(20) NOT NULL COMMENT '工程id',
`name` varchar(255) DEFAULT NULL COMMENT '菜单名称',
`link_url` varchar(500) DEFAULT NULL COMMENT '外链地址',
`tenant_id` bigint(20) NOT NULL COMMENT '租户id',
`application_id` bigint(20) NOT NULL COMMENT '应用id',
`create_at` datetime NOT NULL COMMENT '创建时间',
`update_at` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='工程扩展配置表';
ALTER TABLE t_platform ADD COLUMN `project_types` varchar(255) DEFAULT NULL COMMENT '沙盘搜索工程类型';
ALTER TABLE t_platform ADD COLUMN `filter_button_show` tinyint(3) DEFAULT NULL COMMENT '沙盘筛选按钮1-展示 0-不展示';
DROP TABLE if exists `t_reach_base`;
CREATE TABLE `t_reach_base` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`project_id` bigint(20) NOT NULL COMMENT '工程id',
`reach_sour_long` decimal(9,6) DEFAULT NULL COMMENT '河段源经度',
`reach_sour_lat` decimal(8,6) DEFAULT NULL COMMENT '河段源纬度',
`reach_month_long` decimal(9,6) DEFAULT NULL COMMENT '河段口经度',
`reach_month_lat` decimal(8,6) DEFAULT NULL COMMENT '河段口纬度',
`reach_sour_loc` varchar(256) DEFAULT NULL COMMENT '河段源所在位置',
`reach_month_loc` varchar(256) DEFAULT NULL COMMENT '河段口所在位置',
`reach_len` decimal(7,2) DEFAULT NULL COMMENT '河段长度(km)',
`branch_num` int DEFAULT NULL COMMENT '支流数',
`cr_over_type` tinyint(4) DEFAULT NULL COMMENT '跨界类型:0-未知;1-跨国并跨省;2-跨国;3-跨省;4-跨市;5-跨县;6-县界内',
`flow_region` varchar(256) DEFAULT NULL COMMENT '流经地区',
`reach_info` varchar(256) DEFAULT NULL COMMENT '河段信息',
`project_img_url` varchar(255) DEFAULT NULL COMMENT '工程图片',
`note` varchar(256) DEFAULT NULL COMMENT '备注',
`tenant_id` bigint(20) NOT NULL COMMENT '租户id',
`application_id` bigint(20) NOT NULL COMMENT '应用id',
`create_at` datetime NOT NULL COMMENT '创建时间',
`update_at` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
-- irrigation_monitoring.t_dike_base definition
DROP TABLE if exists `t_dike_base`;
CREATE TABLE `t_dike_base` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`project_id` bigint(20) NOT NULL COMMENT '工程id',
`start_long` decimal(9,6) DEFAULT NULL COMMENT'起点经度',
`start_lat` decimal(8,6) DEFAULT NULL COMMENT'起点纬度',
`end_long` decimal(9,6) DEFAULT NULL COMMENT'终点经度',
`end_lat` decimal(8,6) DEFAULT NULL COMMENT'终点纬度',
`start_loc` varchar(256) DEFAULT NULL COMMENT' 起点所在位置',
`end_loc` varchar(256) DEFAULT NULL COMMENT' 终点所在位置',
`dike_grad` tinyint(4) DEFAULT NULL COMMENT'堤防级别',
`dike_type` tinyint(4) DEFAULT NULL COMMENT' 堤防类型',
`bank` tinyint(4) DEFAULT NULL COMMENT'岸别',
`dike_len` decimal(7,2) DEFAULT NULL COMMENT'堤防长度(m)',
`cr_over_type` tinyint(4) DEFAULT NULL COMMENT '跨界类型:0-未知;1-跨国并跨省;2-跨国;3-跨省;4-跨市;5-跨县;6-县界内',
`dike_loc_type` tinyint(4) DEFAULT NULL COMMENT'堤防位置分类',
`flco_std` int DEFAULT NULL COMMENT' 设计防洪标准(几年一遇)',
`overview` varchar(256) DEFAULT NULL COMMENT'堤防(段)概况',
`std_len` decimal(9,6) DEFAULT NULL COMMENT'达标长度(m)',
`adm_dep` varchar(100) DEFAULT NULL COMMENT '归属部门',
`start_date` datetime DEFAULT NULL COMMENT '开工时间',
`comp_date` datetime DEFAULT NULL COMMENT '建成时间',
`project_ind` varchar(20) DEFAULT NULL COMMENT'工程指标',
`project_img_url` varchar(255) DEFAULT NULL COMMENT '工程图片',
`note` varchar(256) DEFAULT NULL COMMENT '备注',
`tenant_id` bigint(20) NOT NULL COMMENT '租户id',
`application_id` bigint(20) NOT NULL COMMENT '应用id',
`create_at` datetime NOT NULL COMMENT '创建时间',
`update_at` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
-- irrigation_monitoring.t_project_style definition
DROP TABLE if exists `t_project_style`;
CREATE TABLE `t_project_style` (
`id` bigint(20) NOT NULL COMMENT '主键id',
`project_id` bigint(20) NOT NULL COMMENT '工程id',
`style_intro` varchar(1000) DEFAULT NULL COMMENT '工程风貌简介',
`style_img_url` varchar(512) DEFAULT NULL COMMENT '工程风貌图片',
`style_video_url` varchar(255) DEFAULT NULL COMMENT '工程风貌视频',
`note` varchar(256) DEFAULT NULL COMMENT '备注',
`tenant_id` bigint(20) NOT NULL COMMENT '租户id',
`application_id` bigint(20) NOT NULL COMMENT '应用id',
`create_at` datetime NOT NULL COMMENT '创建时间',
`update_at` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
-- 水库、水闸增加工程指标
ALTER TABLE `t_waga_base` ADD COLUMN `project_ind` varchar(20) DEFAULT NULL COMMENT'工程指标' AFTER `project_img_url`;
ALTER TABLE `t_res_base` ADD COLUMN `project_ind` varchar(20) DEFAULT NULL COMMENT'工程指标' AFTER `project_img_url`;
ALTER TABLE `t_project` ADD COLUMN `rv_id` bigint(20) DEFAULT NULL COMMENT '所属河流id' AFTER `chan_type`;
ALTER TABLE `t_project` ADD COLUMN `bas_id` bigint(20) DEFAULT NULL COMMENT '所属流域id' AFTER `chan_type`;