/*
 change.sql 说明
 1.数据库相关修改添加到对应的 change.sql 文件，无需调整其他 sql  文件
 2.sql 语句验证正确后再提交
*/

-- pangq 2021-11-1 pc应用添加描述字段
ALTER TABLE `portal_sys_app`
ADD COLUMN `DESC_` varchar(200) NULL COMMENT '描述' AFTER `CONTENT_`;


-- zengst 2021-11-15 栏目布局添加版本号字段
ALTER TABLE `portal_sys_layout_manage`
    ADD COLUMN VERSION_ INT NULL COMMENT '版本号';

-- pangq 2021-11-16 表单列表添加数据源字段
ALTER TABLE `FORM_DATA_TEMPLATE`
ADD COLUMN `DS_NAME_` varchar(50) NULL COMMENT '数据源名称';

-- pangq 2021-11-16 表单列表添加关联表字段
ALTER TABLE `FORM_DATA_TEMPLATE`
ADD COLUMN `JOIN_TABLES_` varchar(2000) NULL COMMENT '关联表';

-- zhangjun 2021-11-17 删除标签管理下的应用标签
DELETE FROM `portal_sys_type` WHERE `ID_` = '31121';
-- zhangjun 2021-11-17 更新流程标签路径
UPDATE `portal_sys_type` SET `PATH_` = '11.1448213586020302848.' WHERE `ID_` = '1448213586020302848';
-- zhangjun 2021-11-19 流水号别名字段设置为64，与名称相同
ALTER TABLE `portal_sys_identity`
    MODIFY COLUMN `ALIAS_` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '别名' AFTER `NAME_`;

-- heyifan 2021-11-24 修改系统属性中alias列的索引类型为唯一性索引
ALTER TABLE `portal_sys_properties`
DROP INDEX `IDX_SYS_PROPERTIES_ALIAS`,
ADD UNIQUE INDEX `IDX_SYS_PROPERTIES_ALIAS`(`ALIAS`) USING BTREE;


-- yujul 2021-12-03 增加外部系统授权人的姓名字段
ALTER TABLE `portal_biz_system` ADD COLUMN ROBOT_NAME_ VARCHAR(64) NULL COMMENT '授权人姓名';


-- yujl 2021-12-03 增加外部系统管理员表
CREATE TABLE `portal_biz_system_auth` (
          `ID_` varchar(64) DEFAULT NULL,
          `SYS_CODE_` varchar(50) DEFAULT NULL,
          `SYS_NAME_` varchar(50) DEFAULT NULL,
          `MANAGER_ID_` varchar(255) DEFAULT NULL,
          `MANAGER_NAME_` varchar(255) DEFAULT NULL,
          `CREATE_TIME_` datetime DEFAULT NULL,
          `CREATE_BY_` varchar(255) DEFAULT NULL,
          `CREATE_ORG_ID_` varchar(255) DEFAULT NULL,
          `IS_DELE_` varchar(10) DEFAULT NULL,
          `UPDATE_TIME_` datetime DEFAULT NULL,
          `UPDATE_BY_` datetime DEFAULT NULL,
          `TENANT_ID_` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- yujl 2021-12-03 新增【外部系统消息日志】菜单
INSERT INTO `portal_sys_menu`(`ID_`, `PARENT_ID_`, `NAME_`, `ALIAS_`, `ACTIVE_TAB_`, `MENU_ICON_`, `OPENED_`, `SN_`, `TABS_STYLE_`, `PATH_`, `HREF_`, `ROUTE_EXTEND_`, `TENANT_ID_`) VALUES ('1467391005218881536', '5403008', '外部系统消息日志', 'externalSystemQueueLog', '', '', NULL, 7, '', '-1.1.3421053.5403008.1467391005218881536.', '', '{\"path\":\"\",\"component\":\"Layout\",\"redirect\":\"\",\"alwaysShow\":false,\"caseSensitive\":false,\"meta\":{\"title\":\"\"}}', '-1');

-- jason 2021-12-10 新增表单脚本js字段
ALTER TABLE `form_history_record`
    ADD COLUMN `DIY_JS_` text NULL COMMENT '表单脚本js' AFTER `TENANT_ID_`;

-- yujl 2021-12-10 门户设计-个人信息栏目更新显示岗位的字段属性
update portal_sys_column set template_html ='PGRpdj4KICA8ZWwtcm93IDpndXR0ZXI9IjIwIiBzdHlsZT0icGFkZGluZy10b3A6IDEwcHg7IHBhZGRpbmctYm90dG9tOiAxMHB4Ij4KICAgIDxlbC1jb2wgOnNwYW49IjEyIj4KICAgICAgPGRpdiBzdHlsZT0iZmxvYXQ6IGxlZnQ7IHdpZHRoOiA2MHB4OyBoZWlnaHQ6IDYwcHg7IGJvcmRlci1yYWRpdXM6IDUwJSI+CiAgICAgICAgPGltZwogICAgICAgICAgICAgc3JjPSJodHRwczovL2Z1c3MxMC5lbGVtZWNkbi5jb20vZS81ZC80YTczMWE5MDU5NGE0YWY1NDRjMGMyNTk0MTE3MWpwZWcuanBlZyIKICAgICAgICAgICAgIHN0eWxlPSJ3aWR0aDogNjBweDsgaGVpZ2h0OiA2MHB4OyBiYWNrZ3JvdW5kOiByZ2JhKDI0NSwgMjQ1LCAyNDUsIDEpOyBib3JkZXItcmFkaXVzOiA1MCUiCiAgICAgICAgICAgICAvPgogICAgICA8L2Rpdj4KICAgICAgPGRpdiBzdHlsZT0iZmxvYXQ6IGxlZnQ7IHBhZGRpbmctbGVmdDogOHB4Ij4KICAgICAgICA8c3BhbgogICAgICAgICAgICAgIHN0eWxlPSIKICAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOiAyMHB4OwogICAgICAgICAgICAgICAgICAgICBmb250LWZhbWlseTogTWljcm9zb2Z0IFlhSGVpOwogICAgICAgICAgICAgICAgICAgICBmb250LXdlaWdodDogNDAwOwogICAgICAgICAgICAgICAgICAgICBjb2xvcjogcmdiYSg4NSwgODUsIDg1LCAxKTsKICAgICAgICAgICAgICAgICAgICAgbGluZS1oZWlnaHQ6IDMwcHg7CiAgICAgICAgICAgICAgICAgICAgICIKICAgICAgICAgICAgICA+CiAgICAgICAgICDmgqjlpb3vvIF7eyBkYXRhLnVzZXIgPyBkYXRhLnVzZXIuZnVsbG5hbWUgOiAnJyB9fe+8jOelneS9oOW8gOW/g+avj+S4gOWkqe+8gQogICAgICAgIDwvc3Bhbj4KICAgICAgICA8YnIgLz4KICAgICAgICA8c3BhbgogICAgICAgICAgICAgIHN0eWxlPSIKICAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOiAxMnB4OwogICAgICAgICAgICAgICAgICAgICBmb250LWZhbWlseTogTWljcm9zb2Z0IFlhSGVpOwogICAgICAgICAgICAgICAgICAgICBmb250LXdlaWdodDogNDAwOwogICAgICAgICAgICAgICAgICAgICBjb2xvcj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IGZvbnQtd2VpZ2h0OiA0MDA7CiAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvcjogcmdiYSgyOCwgMjgsIDI4LCAxKTsKICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmUtaGVpZ2h0OiAzMHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgIgogICAgICAgICAgICAgICAgICA+CiAgICAgICAgICAgICAge3sgZGF0YS5teVRha3MgPyBkYXRhLm15VGFrcy5kYXRhVGV4dCA6ICcnIH19CiAgICAgICAgICAgIDwvc3Bhbj4KICAgICAgICAgIDwvZGl2PgogICAgICAgICAgPGRpdj4KICAgICAgICAgICAgPHNwYW4KICAgICAgICAgICAgICAgICAgc3R5bGU9IgogICAgICAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOiAxMnB4OwogICAgICAgICAgICAgICAgICAgICAgICAgZm9udC1mYW1pbHk6IE1pY3Jvc29mdCBZYUhlaTsKICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQtd2VpZ2h0OiA0MDA7CiAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvcjogcmdiYSgxNDUsIDE0NSwgMTQ1LCAxKTsKICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmUtaGVpZ2h0OiAzMHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgIgogICAgICAgICAgICAgICAgICA+CiAgICAgICAgICAgICAg5b6F5Yqe5pWw6YePCiAgICAgICAgICAgIDwvc3Bhbj4KICAgICAgICAgIDwvZGl2PgogICAgICAgIDwvZGl2PgogICAgICA8L2Rpdj4KICAgICAgPGRpdiBzdHlsZT0iZmxvYXQ6IHJpZ2h0Ij4KICAgICAgICA8c3BhbiBjbGFzcz0iZWwtZGl2aWRlciBlbC1kaXZpZGVyLS12ZXJ0aWNhbCIgc3R5bGU9ImZvbnQtc2l6ZTogNDBweCI+PC9zcGFuPgogICAgICA8L2Rpdj4KICAgIDwvZWwtY29sPgogICAgPGVsLWNvbCA6c3Bhbj0iMyIgc3R5bGU9InBhZGRpbmctdG9wOiA1cHgiPgogICAgICA8ZGl2IHN0eWxlPSJmbG9hdDogbGVmdCIgQGNsaWNrPSJoYW5kbGVSb3dDbGljaygnL21hdHRlci9teVRhc2s/dGFiQWN0aXZlTmFtZT1kb25lJykiPgogICAgICAgIDxkaXYKICAgICAgICAgICAgIHN0eWxlPSJmbG9hdDogbGVmdDsgd2lkdGg6IDQycHg7IGhlaWdodDogNDJweDsgYmFja2dyb3VuZDogcmdiYSgxMTcsIDE3MSwgMjQ0LCAxKTsgYm9yZGVyLXJhZGl1czogMjFweCIKICAgICAgICAgICAgID4KICAgICAgICAgIDxzcGFuIGNsYXNzPSJpY29uLXlpYmFuIiBzdHlsZT0iZm9udC1zaXplOiAyOHB4OyBwYWRkaW5nOiA4cHg7IGNvbG9yOiByZ2IoMjU1LCAyNTUsIDI1NSkiPjwvc3Bhbj4KICAgICAgICA8L2Rpdj4KICAgICAgICA8ZGl2IHN0eWxlPSJmbG9hdDogbGVmdDsgcGFkZGluZy1sZWZ0OiA4cHgiPgogICAgICAgICAgPGRpdiBzdHlsZT0iaGVpZ2h0OiAxOHB4Ij4KICAgICAgICAgICAgPHNwYW4KICAgICAgICAgICAgICAgICAgc3R5bGU9IgogICAgICAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOiAyMHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgZm9udC1mYW1pbHk6IE1pY3Jvc29mdCBZYUhlaTsKICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQtd2VpZ2h0OiA0MDA7CiAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvcjogcmdiYSgyOCwgMjgsIDI4LCAxKTsKICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmUtaGVpZ2h0OiAzMHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgIgogICAgICAgICAgICAgICAgICA+CiAgICAgICAgICAgICAge3sgZGF0YS5teUFscmVhZHkgPyBkYXRhLm15QWxyZWFkeS5kYXRhVGV4dCA6ICcnIH19CiAgICAgICAgICAgIDwvc3Bhbj4KICAgICAgICAgIDwvZGl2PgogICAgICAgICAgPGRpdj4KICAgICAgICAgICAgPHNwYW4KICAgICAgICAgICAgICAgICAgc3R5bGU9IgogICAgICAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOiAxMnB4OwogICAgICAgICAgICAgICAgICAgICAgICAgZm9udC1mYW1pbHk6IE1pY3Jvc29mdCBZYUhlaTsKICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQtd2VpZ2h0OiA0MDA7CiAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvcjogcmdiYSgxNDUsIDE0NSwgMTQ1LCAxKTsKICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmUtaGVpZ2h0OiAzMHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgIgogICAgICAgICAgICAgICAgICA+CiAgICAgICAgICAgICAg5bey5Yqe5pWw6YePCiAgICAgICAgICAgIDwvc3Bhbj4KICAgICAgICAgIDwvZGl2PgogICAgICAgIDwvZGl2PgogICAgICA8L2Rpdj4KICAgICAgPGRpdiBzdHlsZT0iZmxvYXQ6IHJpZ2h0Ij4KICAgICAgICA8c3BhbiBjbGFzcz0iZWwtZGl2aWRlciBlbC1kaXZpZGVyLS12ZXJ0aWNhbCIgc3R5bGU9ImZvbnQtc2l6ZTogNDBweCI+PC9zcGFuPgogICAgICA8L2Rpdj4KICAgIDwvZWwtY29sPgogICAgPGVsLWNvbCA6c3Bhbj0iMyIgc3R5bGU9InBhZGRpbmctdG9wOiA1cHgiPgogICAgICA8ZGl2IHN0eWxlPSJmbG9hdDogbGVmdCIgQGNsaWNrPSJoYW5kbGVSb3dDbGljaygnL21hdHRlci9hcHBseScpIj4KICAgICAgICA8ZGl2IHN0eWxlPSJmbG9hdDogbGVmdDsgd2lkdGg6IDQycHg7IGhlaWdodDogNDJweDsgYmFja2dyb3VuZDogcmdiYSg5NywgMTk1LCAyMjksIDEpOyBib3JkZXItcmFkaXVzOiAyMXB4Ij4KICAgICAgICAgIDxzcGFuIGNsYXNzPSJpY29uLXJlcWV1c3Qtc3RhcnQiIHN0eWxlPSJmb250LXNpemU6IDI4cHg7IHBhZGRpbmc6IDhweDsgY29sb3I6IHJnYigyNTUsIDI1NSwgMjU1KSI+PC9zcGFuPgogICAgICAgIDwvZGl2PgogICAgICAgIDxkaXYgc3R5bGU9ImZsb2F0OiBsZWZ0OyBwYWRkaW5nLWxlZnQ6IDhweCI+CiAgICAgICAgICA8ZGl2IHN0eWxlPSJoZWlnaHQ6IDE4cHgiPgogICAgICAgICAgICA8c3BhbgogICAgICAgICAgICAgICAgICBzdHlsZT0iCiAgICAgICAgICAgICAgICAgICAgICAgICBmb250LXNpemU6IDIwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICBmb250LWZhbWlseTogTWljcm9zb2Z0IFlhSGVpOwogICAgICAgICAgICAgICAgICAgICAgICAgZm9udC13ZWlnaHQ6IDQwMDsKICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yOiByZ2JhKDI4LCAyOCwgMjgsIDEpOwogICAgICAgICAgICAgICAgICAgICAgICAgbGluZS1oZWlnaHQ6IDMwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAiCiAgICAgICAgICAgICAgICAgID4KICAgICAgICAgICAgICB7eyBkYXRhLm15UmVxdWVzdCA/IGRhdGEubXlSZXF1ZXN0LmRhdGFUZXh0IDogJycgfX0KICAgICAgICAgICAgPC9zcGFuPgogICAgICAgICAgPC9kaXY+CiAgICAgICAgICA8ZGl2PgogICAgICAgICAgICA8c3BhbgogICAgICAgICAgICAgICAgICBzdHlsZT0iCiAgICAgICAgICAgICAgICAgICAgICAgICBmb250LXNpemU6IDEycHg7CiAgICAgICAgICAgICAgICAgICAgICAgICBmb250LWZhbWlseTogTWljcm9zb2Z0IFlhSGVpOwogICAgICAgICAgICAgICAgICAgICAgICAgZm9udC13ZWlnaHQ6IDQwMDsKICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yOiByZ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5bGU9ImhlaWdodDogMThweCI+CiAgICAgICAgICAgIDxzcGFuCiAgICAgICAgICAgICAgICAgIHN0eWxlPSIKICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQtc2l6ZTogMjBweDsKICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQtZmFtaWx5OiBNaWNyb3NvZnQgWWFIZWk7CiAgICAgICAgICAgICAgICAgICAgICAgICBmb250LXdlaWdodDogNDAwOwogICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I6IHJnYmEoMjgsIDI4LCAyOCwgMSk7CiAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lLWhlaWdodDogMzBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICIKICAgICAgICAgICAgICAgICAgPgogICAgICAgICAgICAgIHt7IGRhdGEubXlBY2NvcmRpbmdNYXR0ZXJzID8gZGF0YS5teUFjY29yZGluZ01hdHRlcnMuZGF0YVRleHQgOiAnJyB9fQogICAgICAgICAgICA8L3NwYW4+CiAgICAgICAgICA8L2Rpdj4KICAgICAgICAgIDxkaXY+CiAgICAgICAgICAgIDxzcGFuCiAgICAgICAgICAgICAgICAgIHN0eWxlPSIKICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQtc2l6ZTogMTJweDsKICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQtZmFtaWx5OiBNaWNyb3NvZnQgWWFIZWk7CiAgICAgICAgICAgICAgICAgICAgICAgICBmb250LXdlaWdodDogNDAwOwogICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I6IHJnYmEoMTQ1LCAxNDUsIDE0NSwgMSk7CiAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lLWhlaWdodDogMzBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICIKICAgICAgICAgICAgICAgICAgPgogICAgICAgICAgICAgIOi9rOWKnuaVsOmHjwogICAgICAgICAgICA8L3NwYW4+CiAgICAgICAgICA8L2Rpdj4KICAgICAgICA8L2Rpdj4KICAgICAgPC9kaXY+CiAgICAgIDxkaXYgc3R5bGU9ImZsb2F0OiByaWdodCI+CiAgICAgICAgPHNwYW4gY2xhc3M9ImVsLWRpdmlkZXIgZWwtZGl2aWRlci0tdmVydGljYWwiIHN0eWxlPSJmb250LXNpemU6IDQwcHgiPjwvc3Bhbj4KICAgICAgPC9kaXY+CiAgICA8L2VsLWNvbD4KICA8L2VsLXJvdz4KPC9kaXY+'
where id='1267766070928871424';

-- yujl 增加唯一索引
ALTER TABLE portal_biz_system_auth ADD UNIQUE uni_index ( `SYS_CODE_`, `MANAGER_ID_` );

-- jjx 2022-1-11增加通过下属管理获取当前用户的上级的人员脚本
INSERT INTO BPM_MULTI_SCRIPT(ID_, ALIAS_NAME_, ALIAS_DESC_, CLASS_NAME_, CLASS_INS_NAME_, METHOD_NAME_, METHOD_DESC_, RETURN_TYPE_, ARGUMENT_, ENABLE_, TYPE_, TENANT_ID_) VALUES ('22', NULL, NULL, 'com.hotent.runtime.script.OrgScript', 'orgScript', 'getMasterFromUnder', '通过下属管理获取当前用户的上级', 'java.util.Set', '[{\"paraName\":\"arg0\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"维度id或编码\",\"multiSelect\":false,\"paraCt\":\"base:dem-selector\",\"paraCtBindKey\":\"id\",\"paraCtBindName\":\"id\"}]', 1, 2, '-1');

-- zhqa 2022-1-20 流程图表添加别名字段
ALTER TABLE `BPM_REPORT_LIST`
ADD COLUMN `ALIAS_` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '别名' AFTER `NAME_`;

-- yujl 2022-01-24 新增在线用户管理菜单。目录：用户管理-在线用户
INSERT INTO `portal_sys_menu`(`ID_`, `PARENT_ID_`, `NAME_`, `ALIAS_`, `ACTIVE_TAB_`, `MENU_ICON_`, `OPENED_`, `SN_`, `TABS_STYLE_`, `PATH_`, `HREF_`, `TENANT_ID_`) VALUES ('1376480241760997376', '3441027', '在线用户', 'onlineUserManager', '', '', NULL, 4, '', '-1.1.3441009.3441027.1376480241760997376.', '', '-1');

-- yujl 2021-01-26 关系矩阵添加搜索条件字段标识
ALTER TABLE `uc_matrix_col_def`
    ADD COLUMN `SEARCH_FIELD_` varchar(50) NULL COMMENT '是否作为搜索条件';


-- leijian 2021-02-9 流程自动发起配置表添加定时任务关联key
ALTER TABLE `bpm_auto_start_conf`
    ADD COLUMN `trigger_name_` varchar(100) NULL COMMENT '触发器key';

-- jjx 2022-02-18 新增内部消息菜单地址
INSERT INTO `portal_sys_menu` VALUES ('1494487013470261248', '1441341228585766912', '消息中心', 'xxzx', '', '', NULL, 1, '', '-1.3.1441341228585766912.1494487013470261248.', '', '-1', '{\"path\":\"message\",\"component\":\"@/views/personal/message\",\"redirect\":\"\",\"alwaysShow\":false,\"caseSensitive\":false,\"meta\":{\"title\":\"消息中心\",\"isChildren\":true}}');

-- 2022-2-21 新增流程发起人账号属性
ALTER TABLE `bpm_pro_inst`
ADD COLUMN `CREATE_ACCOUNT_` varchar(64) NULL COMMENT '流程发起人账号';

-- 2022-02-21 chenzm 新增扩展jar相关的菜单
INSERT INTO `PORTAL_SYS_MENU`(`ID_`, `PARENT_ID_`, `NAME_`, `ALIAS_`, `ACTIVE_TAB_`, `MENU_ICON_`, `OPENED_`, `SN_`, `TABS_STYLE_`, `PATH_`, `HREF_`, `TENANT_ID_`) VALUES ('1351410819870625792', '4291768', '已发布脚本', 'extendClassManager', '', '', 1, 6, '', '-1.1.3641025.4291768.1351410819870625792.', '', '-1');
INSERT INTO `PORTAL_SYS_MENU`(`ID_`, `PARENT_ID_`, `NAME_`, `ALIAS_`, `ACTIVE_TAB_`, `MENU_ICON_`, `OPENED_`, `SN_`, `TABS_STYLE_`, `PATH_`, `HREF_`, `TENANT_ID_`) VALUES ('1351409335724544000', '4291768', '扩展Jar包管理', 'extendJarManager', '', '', 1, 5, '', '-1.1.3641025.4291768.1351409335724544000.', '', '-1');

-- 2022-02-21 chenzm  新增扩展jar包管理表
CREATE TABLE bpm_extend_jar  (
  ID_ varchar(64)  NOT NULL,
  NAME_ varchar(255)  DEFAULT NULL COMMENT 'jar包名称',
  DESC_ varchar(255)  DEFAULT NULL COMMENT 'jar包描述',
  JAR_FILE_ varchar(2000)  DEFAULT NULL COMMENT 'jar包的附件路径',
  JAR_BYTES_ longblob NULL COMMENT 'jar包的二进制数据',
  CREATE_BY_ varchar(255)  DEFAULT NULL COMMENT '上传人id',
  CREATE_NAME_ varchar(255)  DEFAULT NULL COMMENT '上传人姓名',
  UPDATE_BY_ varchar(255)  DEFAULT NULL COMMENT '发布人id',
  UPDATE_NAME_ varchar(255)  DEFAULT NULL COMMENT '发布人姓名',
  CREATE_TIME_ datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
  UPDATE_TIME_ datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
  SIZE_ int(0) NULL DEFAULT NULL COMMENT 'jar包大小(kb)',
  STATUS_ int(0) NULL DEFAULT NULL COMMENT 'jar包状态。1：未发布，2：已发布',
  PRIMARY KEY (ID_) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '扩展jar包管理表';

-- 2022-02-21 chenzm  新增已发布扩展脚本管理表
CREATE TABLE bpm_extend_class  (
  ID_ varchar(64)  NOT NULL,
  JAR_ID_ varchar(64)  DEFAULT NULL COMMENT '所属jar包id',
  SIMPLE_NAME_ varchar(255)  DEFAULT NULL COMMENT '类名首字母小写，即beanId',
  PATH_ varchar(500)  DEFAULT NULL COMMENT '类名全路径',
  DESC_ varchar(255)  DEFAULT NULL COMMENT '类描述',
  MD5_ varchar(255)  DEFAULT NULL COMMENT 'MD5版本号',
  TYPE_ varchar(1)  DEFAULT NULL COMMENT '脚本类型1：条件脚本，2：人员脚本',
  PRIMARY KEY (ID_) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '已发布扩展脚本管理表' ;

-- 2022-02-25 yijj  新增流程实例彻底删除日志记录表
CREATE TABLE `bpm_inst_delete_log` (
  `ID_` varchar(64) DEFAULT NULL,
  `FULLNAME_` varchar(255) DEFAULT NULL COMMENT '操作人姓名',
  `ACCOUNT_` varchar(255) DEFAULT NULL COMMENT '操作人账号',
  `DELETE_TIME_` datetime DEFAULT NULL COMMENT '删除时间',
  `INST_SUBJECT_` varchar(128) DEFAULT NULL COMMENT '删除流程实例对象',
  `CONTENT_` varchar(255) DEFAULT NULL COMMENT '删除事由'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='流程实例删除日志';


-- 2022-03-01 jjx  添加菜单默认图标
UPDATE `portal_sys_menu` SET  `MENU_ICON_` = 'icon-design' WHERE `ID_` = '3441002';
UPDATE `portal_sys_menu` SET  `MENU_ICON_` = 'icon-integrate' WHERE `ID_` = '1437982148582154240';
UPDATE `portal_sys_menu` SET  `MENU_ICON_` = 'icon-system' WHERE `ID_` = '3421053';
UPDATE `portal_sys_menu` SET  `MENU_ICON_` = 'icon-user1' WHERE `ID_` = '3441009';
UPDATE `portal_sys_menu` SET  `MENU_ICON_` = 'icon-process' WHERE `ID_` = '1441339605377536000';
UPDATE `portal_sys_menu` SET `MENU_ICON_` = 'icon-process' WHERE `ID_` = '3641025';
UPDATE `portal_sys_menu` SET  `MENU_ICON_` = 'icon-application1' WHERE `ID_` = '1254651824338767872';
UPDATE `portal_sys_menu` SET  `MENU_ICON_` = 'icon-application1' WHERE `ID_` = '1441341831483412480';
UPDATE `portal_sys_menu` SET `MENU_ICON_` = 'icon-user1' WHERE `ID_` = '1441341228585766912';
UPDATE `portal_sys_menu` SET `MENU_ICON_` = 'icon-aside-home' WHERE `ID_` = '1441359555827781632';

-- 2022-03-02 yijj 修改邮件内容字段为longtext
ALTER TABLE `portal_sys_mail` MODIFY COLUMN `CONTENT_` longtext COMMENT '内容';

-- 2022-03-02 yijj 去除系统属性 超时时间sql
DELETE FROM portal_sys_properties WHERE ALIAS='overTime';


-- 2022-03-03 zengst 一般用户添加默认菜单的权限
INSERT INTO portal_sys_role_auth (ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1499226092684890112', 'ybyh', 'matter', null, null, '-1');
INSERT INTO portal_sys_role_auth (ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1499226092705861632', 'ybyh', 'personal', null, null, '-1');
INSERT INTO portal_sys_role_auth (ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1499226092705861633', 'ybyh', 'appCenter1', null, null, '-1');
INSERT INTO portal_sys_role_auth (ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1499226092705861634', 'ybyh', 'new', null, null, '-1');
INSERT INTO portal_sys_role_auth (ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1499226092705861635', 'ybyh', 'myTask', null, null, '-1');
INSERT INTO portal_sys_role_auth (ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1499226092710055936', 'ybyh', 'apply', null, null, '-1');
INSERT INTO portal_sys_role_auth (ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1499226092710055937', 'ybyh', 'homePage', null, null, '-1');
INSERT INTO portal_sys_role_auth (ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1499226092714250240', 'ybyh', 'Index', null, null, '-1');
INSERT INTO portal_sys_role_auth (ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1499226092714250241', 'ybyh', 'setting', null, null, '-1');
INSERT INTO portal_sys_role_auth (ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1499226092718444544', 'ybyh', 'mail', null, null, '-1');
INSERT INTO portal_sys_role_auth (ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1499226092718444545', 'ybyh', 'appCenter2', null, null, '-1');
INSERT INTO portal_sys_role_auth (ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1499226092718444546', 'ybyh', 'personalCenter', null, null, '-1');
INSERT INTO portal_sys_role_auth (ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1499226092718444547', 'ybyh', 'approvalForm', null, null, '-1');
INSERT INTO portal_sys_role_auth (ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1499226092718444548', 'ybyh', 'circulateMatter', null, null, '-1');
INSERT INTO portal_sys_role_auth (ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1499226092722638848', 'ybyh', 'xxzx', null, null, '-1');
INSERT INTO portal_sys_role_auth (ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1499226092722638849', 'ybyh', 'startProcess', null, null, '-1');

-- 2022-03-02 yijj 新增流程实例回收站菜单
INSERT INTO `portal_sys_menu`(`ID_`, `PARENT_ID_`, `NAME_`, `ALIAS_`, `ACTIVE_TAB_`, `MENU_ICON_`, `OPENED_`, `SN_`, `TABS_STYLE_`, `PATH_`, `HREF_`, `TENANT_ID_`, `ROUTE_EXTEND_`) VALUES ('1497089603655909376', '4171077', '实例回收站', 'instanceRecovery', '', '', NULL, 4, '', '-1.1.3641025.4171077.1497089603655909376.', '', '-1', '{\"path\":\"\",\"component\":\"Layout\",\"redirect\":\"\",\"alwaysShow\":false,\"caseSensitive\":false,\"meta\":{\"title\":\"\"}}');

-- 2022-03-11 tanhz 应用模块->pc模块 base64图片值
ALTER TABLE portal_sys_app MODIFY COLUMN ICON_ MEDIUMTEXT NULL COMMENT '图标';

-- 2022-03-15 jjx 添加首页布局标题名
UPDATE `portal_sys_menu` SET  `ROUTE_EXTEND_` = '{\"meta\":{\"title\":\"首页\"},\"component\":\"Layout\",\"redirect\":\"index\",\"path\":\"/\"}' WHERE `ID_` = '1441359555827781632';

-- 2022-03-16 jjx 修改FORM_DATA_类型为longtext
ALTER TABLE `bpm_check_opinion` MODIFY COLUMN `FORM_DATA_` longtext ;

-- 2022-03-19 jjx 修改索引c
create index ALIAS_TENANT_ID__index
   on portal_sys_column (ALIAS, TENANT_ID_);
