Browse Source

fix: 完善更新脚本

zhongwei
haungxing 3 months ago
parent
commit
d55be2b38a
  1. 12
      hzims-service/operational/src/main/resources/db/3.0.2.sql
  2. 11
      hzims-service/safeproduct/src/main/resources/db/3.0.0.sql

12
hzims-service/operational/src/main/resources/db/3.0.2.sql

@ -1,2 +1,12 @@
-- 运行月报添加分析结果字段 -- 运行月报添加分析结果字段
alter table `hzims_run_month_report` add COLUMN `analyse_result` TEXT comment '分析结果'; alter table `hzims_run_month_report` add COLUMN `analyse_result` TEXT comment '分析结果';
CREATE VIEW IF NOT EXISTS `v_hzims_oper_maintenance_task` AS
select `TITLE` AS `TITLE`,`disposer_name` AS `disposer_name`,`DISPOSE_TIME` AS `DISPOSE_TIME`,`HOURS` AS `HOURS`,`ACT_HOURS` AS `ACT_HOURS`,`flow_task_name` AS `flow_task_name`,`CREATE_USER` AS `CREATE_USER`,`CREATE_DEPT` AS `CREATE_DEPT`
from `hzims_oper_maintenance_task`
where (`IS_DELETED` = 0);
CREATE VIEW `v_hzims_run_month_report` AS
select `hzims_run_month_report`.`ID` AS `ID`,`hzims_run_month_report`.`STATION_CODE` AS `STATION_CODE`,`STATION_NAME` AS `STATION_NAME`,`MONTH` AS `MONTH`,`RUN_DATA` AS `RUN_DATA`,`ALARM_DATA` AS `ALARM_DATA`,`ANALYSIS_DATA` AS `ANALYSIS_DATA`,`CURVE_DATA` AS `CURVE_DATA`,`RUN_PROPOSE` AS `RUN_PROPOSE`,`TENANT_ID` AS `TENANT_ID`,`STATUS` AS `STATUS`,`CREATE_DEPT` AS `CREATE_DEPT`,`IS_DELETED` AS `IS_DELETED`,`CREATE_USER` AS `CREATE_USER`,`CREATE_TIME` AS `CREATE_TIME`,`UPDATE_USER` AS `UPDATE_USER`,`UPDATE_TIME` AS `UPDATE_TIME`,`analyse_result` AS `analyse_result`,'万kWh' AS `GENETARE_UNIT`
from `hzims_run_month_report`
where (`IS_DELETED` = 0);

11
hzims-service/safeproduct/src/main/resources/db/3.0.0.sql

@ -11,4 +11,13 @@ ALTER TABLE `hzims_risk_hazard_task`
ALTER TABLE `hzims_safe_safety_tool_type` ALTER TABLE `hzims_safe_safety_tool_type`
ADD COLUMN `dept_id` varchar(50) DEFAULT NULL COMMENT '机构id', ADD COLUMN `dept_id` varchar(50) DEFAULT NULL COMMENT '机构id',
ADD COLUMN `dept_name` varchar(50) DEFAULT NULL COMMENT '机构名称'; ADD COLUMN `dept_name` varchar(50) DEFAULT NULL COMMENT '机构名称';
alter table `hzims_safe_safety_tool_recheck`
add column `STATUS` tinyint(4) NULL DEFAULT NULL COMMENT '业务状态',
add column `CREATE_DEPT` bigint(20) NULL DEFAULT NULL COMMENT '创建单位',
add column `CREATE_USER` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
add column `UPDATE_USER` bigint(20) NULL DEFAULT NULL COMMENT '修改人',
add column `UPDATE_TIME` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
add column `IS_DELETED` tinyint(4) NULL DEFAULT 0,
add column `TENANT_ID` varchar(12) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '租户ID';

Loading…
Cancel
Save