-- 2020-7-21 qiuxd 迁移角色矩阵的代码
CREATE TABLE `uc_matrix` (
  `ID_` varchar(64) NOT NULL COMMENT '主键',
  `CODE_` varchar(255) DEFAULT NULL COMMENT '编码/别名',
  `NAME_` varchar(255) DEFAULT NULL COMMENT '名称',
  `TYPE_ID_` varchar(64) DEFAULT NULL COMMENT '分类ID',
  `TYPE_NAME_` varchar(255) DEFAULT NULL COMMENT '分类名称',
  `STATUS_` int(1) DEFAULT NULL COMMENT '状态：0待发布、1已发布',
  `MANAGER_ID_` varchar(64) DEFAULT NULL COMMENT '管理员ID',
  `MANAGER_NAME_` varchar(255) DEFAULT NULL COMMENT '管理员名称',
  `IS_DELE_` int(1) DEFAULT NULL COMMENT '是否删除：0未除、1已删',
  `CREATE_BY_` varchar(64) DEFAULT NULL COMMENT '创建人',
  `CREATE_TIME_` datetime DEFAULT NULL COMMENT '创建时间',
  `CREATE_ORG_ID_` varchar(64) DEFAULT NULL COMMENT '创建人部门id',
  `UPDATE_BY_` varchar(64) DEFAULT NULL COMMENT '更新人',
  `UPDATE_TIME_` datetime DEFAULT NULL COMMENT '更新时间',
  `tenant_id_` varchar(64) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='矩阵管理';

CREATE TABLE `uc_matrix_col_def` (
  `ID_` varchar(64) NOT NULL COMMENT '主键',
  `MATRIX_ID_` varchar(255) DEFAULT NULL COMMENT '所属矩阵ID',
  `CODE_` varchar(20) DEFAULT NULL COMMENT '列字段名',
  `NAME_` varchar(128) DEFAULT NULL COMMENT '列中文名',
  `STATUS_` int(1) DEFAULT NULL COMMENT '列状态：0未创建列、1已创建列',
  `COL_TYPE_` int(1) DEFAULT NULL COMMENT '列类型：1条件列、2角色列',
  `SELECT_TYPE_` int(1) DEFAULT NULL COMMENT '选择类型：1单选、2多选',
  `CTRL_TYPE_` varchar(20) DEFAULT NULL COMMENT '控件类型',
  `QUERY_ALIAS_` varchar(255) DEFAULT NULL COMMENT '关联查询alias',
  `COL_CONFIG_` varchar(255) DEFAULT NULL COMMENT '列配置信息',
  `IS_DELE_` int(1) DEFAULT NULL COMMENT '是否删除：0未删、1已删',
  `CREATE_BY_` varchar(64) DEFAULT NULL COMMENT '创建人',
  `CREATE_TIME_` datetime DEFAULT NULL COMMENT '创建时间',
  `CREATE_ORG_ID_` varchar(64) DEFAULT NULL COMMENT '创建人部门id',
  `UPDATE_BY_` varchar(64) DEFAULT NULL COMMENT '更新人',
  `UPDATE_TIME_` datetime DEFAULT NULL COMMENT '更新时间',
  `TENANT_ID_` varchar(64) DEFAULT NULL COMMENT '租户id',
  `SN_` int(3) DEFAULT NULL COMMENT '排序',
  `BIND_KEY_` varchar(255) DEFAULT NULL COMMENT '条件列的回填key的绑定值',
  `BIND_VALUE_` varchar(255) DEFAULT NULL COMMENT '条件列的回填value的绑定值',
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='矩阵列定义';

-- 2020-7-22 邱喜达 人员脚本调整
UPDATE BPM_MULTI_SCRIPT SET METHOD_DESC_ = '通过下属管理获取用户的上级',ARGUMENT_ = '[{\"paraName\":\"arg0\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"用户id\",\"multiSelect\":false,\"paraCt\":\"base:user-selector\",\"paraCtBindKey\":\"id\",\"paraCtBindName\":\"id\"},{\"paraName\":\"arg1\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"维度id或编码\",\"multiSelect\":false,\"paraCt\":\"base:dem-selector\",\"paraCtBindKey\":\"id\",\"paraCtBindName\":\"id\"}]'
WHERE ID_ = '21';
UPDATE BPM_MULTI_SCRIPT SET METHOD_DESC_ = '通过下属管理获取当前用户的上级',ARGUMENT_ = '[{\"paraName\":\"arg0\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"维度id或编码\",\"multiSelect\":false,\"paraCt\":\"base:dem-selector\",\"paraCtBindKey\":\"id\",\"paraCtBindName\":\"id\"}]'
WHERE ID_ = '22';
UPDATE BPM_MULTI_SCRIPT SET METHOD_DESC_ = '通过下属管理获取发起人的上级',ARGUMENT_ = '[{\"paraName\":\"arg0\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"维度id或编码\",\"multiSelect\":false,\"paraCt\":\"base:dem-selector\",\"paraCtBindKey\":\"id\",\"paraCtBindName\":\"id\"}]'
WHERE ID_ = '23';

ALTER TABLE UC_ORG_POST ADD PARENT_ID_ VARCHAR(64) DEFAULT NULL;

ALTER TABLE UC_USER_UNDER ADD DIMEN_ID_ VARCHAR(64) DEFAULT NULL;


-- 2020-08-21 tangxin 流程bpm_task_trans表添加INQU_TYPE_字段
ALTER TABLE bpm_task_trans ADD COLUMN INQU_TYPE_ varchar(20) NULL COMMENT '征询类型：direct,step' AFTER SIGN_TYPE_;

-- 2020-08-24 zhaoxiangyun 新增审批意见暂存表
CREATE TABLE `bpm_save_opinion` (
  `ID_` varchar(255) NOT NULL COMMENT '主键ID',
  `PROC_INST_ID_` varchar(255) NOT NULL COMMENT '流程实例ID',
  `TASK_ID_` varchar(255) NOT NULL COMMENT '任务ID',
  `OPINION_` varchar(2000) NOT NULL COMMENT '暂存的审批意见',
  `CREATE_BY_` varchar(64) DEFAULT NULL COMMENT '创建人',
  `CREATE_TIME_` datetime DEFAULT NULL COMMENT '创建时间',
  `UPDATE_BY_` varchar(64) DEFAULT NULL COMMENT '更新人',
  `UPDATE_TIME_` datetime DEFAULT NULL COMMENT '更新时间',
  `TENANT_ID_` varchar(64) DEFAULT NULL COMMENT '租户ID',
  PRIMARY KEY (`ID_`)
  	) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 2020-08-24 zhaoxiangyun 数据报表草稿数据表新增更新人、更新时间字段
ALTER TABLE form_data_template_draft ADD COLUMN UPDATE_BY_ varchar(64) DEFAULT NULL COMMENT '更新人';
ALTER TABLE form_data_template_draft ADD COLUMN UPDATE_TIME_ datetime DEFAULT NULL COMMENT '更新时间';

-- 2020-08-25 黎扬贵 修改微服务名称
UPDATE portal_sys_logs_settings SET MODULE_TYPE_ = 'eip-uc' WHERE ID_ = '1';
UPDATE portal_sys_logs_settings SET MODULE_TYPE_ = 'eip-portal' WHERE ID_ = '2';
UPDATE portal_sys_logs_settings SET MODULE_TYPE_ = 'eip-form' WHERE ID_ = '3';
UPDATE portal_sys_logs_settings SET MODULE_TYPE_ = 'eip-bpm-model' WHERE ID_ = '4';
UPDATE portal_sys_logs_settings SET MODULE_TYPE_ = 'eip-bpm-runtime' WHERE ID_ = '5';
UPDATE portal_sys_logs_settings SET MODULE_TYPE_ = 'base' WHERE ID_ = '6';

-- 2020-08-26 刘美琴 更新字段长度
ALTER TABLE `form_custom_dialog` MODIFY COLUMN `DIY_SQL_`  varchar(5000);
ALTER TABLE `form_custom_query` MODIFY COLUMN `DIY_SQL_`  varchar(5000);

-- 2020-08-27 qiuxida 新增应用中心
CREATE TABLE PORTAL_SYS_APP (
  ID_ varchar(64) NOT NULL COMMENT '主键',
  NAME_ varchar(128) DEFAULT NULL COMMENT '应用名称',
  ICON_ varchar(128) DEFAULT NULL COMMENT '图标',
  ICON_COLOR_ varchar(10) DEFAULT NULL COMMENT '图标颜色',
  TYPE_ smallint(2) DEFAULT NULL COMMENT '类型',
  PAGE_ int(10) DEFAULT NULL COMMENT '所在页',
  IS_PUBLISH_ smallint(2) DEFAULT NULL COMMENT '是否发布 1发布 0未发布',
  SN_ int(2) DEFAULT NULL COMMENT '顺序',
  CONTENT_ text COMMENT '内容',
  CREATE_TIME_ datetime DEFAULT NULL COMMENT '创建时间',
  UPDATE_TIME_ datetime DEFAULT NULL COMMENT '更新时间',
  CREATE_BY_ varchar(64) DEFAULT NULL COMMENT '创建人',
  UPDATE_BY_ varchar(64) DEFAULT NULL COMMENT '更新人',
  TENANT_ID_ varchar(64) DEFAULT NULL COMMENT '租户ID',
  PRIMARY KEY (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE PORTAL_SYS_APP_MENU (
  ID_ varchar(64) NOT NULL COMMENT '主键',
  PARENT_ID_ varchar(64) DEFAULT NULL COMMENT '父节点ID',
  NAME_ varchar(128) DEFAULT NULL COMMENT '菜单名称',
  ALIAS_ varchar(255) DEFAULT NULL COMMENT '别名',
  TYPE_ smallint(2) DEFAULT NULL COMMENT '类型',
  CONTENT_ text COMMENT '内容',
  SN_ varchar(255) DEFAULT NULL COMMENT '排序',
  APP_ID_ varchar(64) DEFAULT NULL COMMENT 'APPID',
  CREATE_TIME_ datetime DEFAULT NULL COMMENT '创建时间',
  CREATE_BY_ varchar(64) DEFAULT NULL COMMENT '创建人',
  UPDATE_TIME_ datetime DEFAULT NULL COMMENT '更新时间',
  UPDATE_BY_ varchar(64) DEFAULT NULL COMMENT '更新人',
  TENANT_ID_ varchar(64) DEFAULT NULL COMMENT '组合ID',
  PRIMARY KEY (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO PORTAL_SYS_MENU(ID_, PARENT_ID_, NAME_, ALIAS_, ACTIVE_TAB_, MENU_ICON_, OPENED_, SN_, TABS_STYLE_, PATH_, HREF_, TENANT_ID_) VALUES ('1296282423985836032', '3711006', '应用中心', 'appCenter', '', '', 1, 5, '', '-1.1.3441002.3711006.1296282423985836032.', '', '-1');

INSERT INTO PORTAL_SYS_COLUMN(ID, NAME, ALIAS, CATALOG, COL_TYPE, DATA_MODE, DATA_FROM, DS_ALIAS, DS_NAME, COL_HEIGHT, COL_URL, TEMPLATE_HTML, IS_PUBLIC, SUPPORT_REFESH, REFESH_TIME, SHOW_EFFECT, MEMO, DATA_PARAM, NEEDPAGE, ORG_ID, CREATOR, CREATE_BY_, UPDATE_BY_, CREATE_TIME_, UPDATE_TIME_, REQUEST_TYPE, CATALOG_NAME, CREATE_ORG_ID_, TENANT_ID_) VALUES ('1298555788968726528', '应用中心', 'yyzx', '31081', 0, 3, '${portal}/portal/sysApp/v1/listJson', '', NULL, 250, '/appCenterFront', 'PGVsLXJvdyBzdHlsZT0icGFkZGluZy10b3A6MTBweDt0ZXh0LWFsaWduOiBjZW50ZXI7Ij4KICAgIDxlbC1jb2wgCiAgICAgICAgOnNwYW49JzYnIAogICAgICAgIHN0eWxlPSJ0ZXh0LWFsaWduOiBjZW50ZXIiCiAgICAgICAgdi1mb3I9J2FwcCBpbiBkYXRhLnJvd3MnPgogICAgICAgIDxlbC1jYXJkCiAgICAgICAgICAgICAgc2hhZG93PSJob3ZlciIKICAgICAgICAgICAgICA6c3R5bGU9IntoZWlnaHQ6ICc5MHB4Jyx3aWR0aDogJzkwcHgnLGJhY2tncm91bmQ6IGFwcC5pY29uQ29sb3I/YXBwLmljb25Db2xvcjonIzEzMzlFMCcsY3Vyc29yOidwb2ludGVyJ30iCiAgICAgICAgICAgICAgOmJvZHktc3R5bGU9InsgcGFkZGluZzogJzBweCcgfSIKICAgICAgICAgICAgICBAY2xpY2submF0aXZlPSJjbGlja0FwcChhcHApIj4KICAgICAgICAgICAgPGkgc3R5bGU9ImZvbnQtc2l6ZTo4MHB4O3BhZGRpbmctdG9wOiA1cHg7Y29sb3I6ICNmZmZmZmYiIDpjbGFzcz0iYXBwLmljb24/YXBwLmljb246J2ljb24taG90ZW50LUgnIj48L2k+CiAgICAgICAgICA8L2VsLWNhcmQ+CiAgICAgICAgICA8ZGl2IHN0eWxlPSJmb250LXNpemU6IDEwcHg7dGV4dC1vdmVyZmxvdzplbGxpcHNpczt3aWR0aDogOTBweDsiPnt7YXBwLm5hbWV9fTwvZGl2PgogICAgPC9lbC1jb2w+CjwvZWwtcm93Pg==', 2, NULL, NULL, NULL, '', '[{\"name\":\"pageBean\",\"type\":\"string\",\"mode\":\"0\",\"value\":\"{\\\"page\\\":1,\\\"pageSize\\\":8,\\\"total\\\":0,\\\"showTotal\\\":false}\"},{\"name\":\"querys\",\"type\":\"string\",\"mode\":\"0\",\"value\":\"[{\\\"property\\\": \\\"is_publish_\\\", \\\"value\\\": \\\"1\\\", \\\"group\\\": \\\"main\\\", \\\"operation\\\": \\\"EQUAL\\\", \\\"relation\\\": \\\"OR\\\"}]\"},{\"name\":\"sorter\",\"type\":\"string\",\"mode\":\"0\",\"value\":\"[{\\\"direction\\\": \\\"ASC\\\",\\\"property\\\": \\\"sn_\\\"}]\"}]', 0, NULL, NULL, NULL, '1', NULL, NULL, 'POST', '默认分类', NULL, '-1');

UPDATE PORTAL_SYS_LAYOUT_MANAGE SET NAME = '应用端-系统默认布局', MEMO = '', TEMPLATE_HTML = '', DESIGN_HTML = 'eyJsaXN0IjpbeyJ0eXBlIjoiZ3JpZCIsIm5hbWUiOiLmoIXmoLzluIPlsYAiLCJpY29uIjoiaWNvbi1ncmlkIiwiY29sdW1ucyI6W3sic3BhbiI6MjQsImxpc3QiOlt7Im5hbWUiOiLkuKrkurrkv6Hmga/moI/nm64iLCJhbGlhcyI6ImdyeHhsbSIsIm9wdGlvbnMiOnsicmVtb3RlRnVuYyI6ImZ1bmNfMTU5MTE0OTIwODAwMF81NDE1MyJ9LCJrZXkiOiIxNTkxMTQ5MjA4MDAwXzU0MTUzIiwibW9kZWwiOiJ1bmRlZmluZWRfMTU5MTE0OTIwODAwMF81NDE1MyIsInJ1bGVzIjpbXX1dfV0sIm9wdGlvbnMiOnsiZ3V0dGVyIjowLCJqdXN0aWZ5Ijoic3RhcnQiLCJhbGlnbiI6InRvcCIsInJlbW90ZUZ1bmMiOiJmdW5jXzE1OTEwOTcxNTIwMDBfNjQwMzAifSwia2V5IjoiMTU5MTA5NzE1MjAwMF82NDAzMCIsIm1vZGVsIjoiZ3JpZF8xNTkxMDk3MTUyMDAwXzY0MDMwIiwicnVsZXMiOltdfSx7InR5cGUiOiJncmlkIiwibmFtZSI6IuagheagvOW4g+WxgCIsImljb24iOiJpY29uLWdyaWQiLCJjb2x1bW5zIjpbeyJzcGFuIjoxMiwibGlzdCI6W3sibmFtZSI6IuaIkeeahOW+heWKniIsImFsaWFzIjoidnVlVG9kbyIsIm9wdGlvbnMiOnsicmVtb3RlRnVuYyI6ImZ1bmNf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In0sImtleSI6IjE1OTEwOTcyNDMwMDBfODMxNjciLCJtb2RlbCI6ImdyaWRfMTU5MTA5NzI0MzAwMF84MzE2NyIsInJ1bGVzIjpbXX1dLCJjb25maWciOnsibGFiZWxXaWR0aCI6MTAwLCJsYWJlbFBvc2l0aW9uIjoicmlnaHQiLCJzaXplIjoic21hbGwifX0=') WHERE ID = '2';
INSERT INTO PORTAL_SYS_AUTH_USER(ID_, AUTHORIZE_ID_, OWNER_ID_, OWNER_NAME_, RIGHT_TYPE_, OBJ_TYPE_, TENANT_ID_) VALUES ('1298555789090361344', '1298555788968726528', NULL, NULL, 'everyone', 'indexColumn', '-1');

INSERT INTO PORTAL_SYS_MENU(ID_, PARENT_ID_, NAME_, ALIAS_, ACTIVE_TAB_, MENU_ICON_, OPENED_, SN_, TABS_STYLE_, PATH_, HREF_, TENANT_ID_) VALUES ('1300728049968484352', '3', '应用中心', 'appCenterFront', '', '', NULL, 4, '', '-1.3.1300728049968484352.', '', '-1');


-- lingpj 默认角色的菜单授权
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163664288452608', 'xtgly', 'bpm_platform', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163664317812736', 'xtgly', 'manage_menu', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163665894871040', 'xtgly', 'orgManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163665915842560', 'xtgly', 'jobManage', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163665932619776', 'xtgly', 'postManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163665953591296', 'xtgly', 'prgParamManage', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163665974562816', 'xtgly', 'ucManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163665995534336', 'xtgly', 'userListManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666016505856', 'xtgly', 'userParamManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666033283072', 'xtgly', 'loginLogManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666050060288', 'xtgly', 'roleMatrixManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666071031808', 'xtgly', 'matrixManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666092003328', 'xtgly', 'roleManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666117169152', 'xtgly', 'reportLine', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666138140672', 'xtgly', 'pwdStrategy', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666154917888', 'xtgly', 'heiOrganization', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666171695104', 'xtgly', 'scheduling', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666196860928', 'xtgly', 'holidayManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666217832448', 'xtgly', 'shiftRuleManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666230415360', 'xtgly', 'tenant', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666251386880', 'xtgly', 'tenantTypeManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666276552704', 'xtgly', 'tenantManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666289135616', 'xtgly', 'tenantParamsManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666310107136', 'xtgly', 'front_menu', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666326884352', 'xtgly', 'v-flow', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666343661568', 'xtgly', 'v-leader', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666364633088', 'xtgly', 'v-todo', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666385604608', 'xtgly', 'v-done', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666402381824', 'xtgly', 'v-request', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666419159040', 'xtgly', 'v-flowList', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666435936256', 'xtgly', 'v-todoRead', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666452713472', 'xtgly', 'v-doneRead', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666473684992', 'xtgly', 'v-myRead', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666486267904', 'xtgly', 'v-myDelegate', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666507239424', 'xtgly', 'v-mail', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666524016640', 'xtgly', 'v-mailList', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666549182464', 'xtgly', 'v-linkmanList', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666565959680', 'xtgly', 'v-settingList', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666582736896', 'xtgly', 'v-personal', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666599514112', 'xtgly', 'v-agent', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666616291328', 'xtgly', 'v-approvalItem', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666637262848', 'xtgly', 'v-secretary', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705140973568', 'rsgly', 'bpm_platform', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705157750784', 'rsgly', 'manage_menu', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705174528000', 'rsgly', 'orgStructure', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705199693824', 'rsgly', 'organization', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705220665344', 'rsgly', 'demension', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705241636864', 'rsgly', 'orgManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705266802688', 'rsgly', 'jobManage', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705287774208', 'rsgly', 'postManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705312940032', 'rsgly', 'prgParamManage', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705338105856', 'rsgly', 'ucManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705367465984', 'rsgly', 'userListManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705392631808', 'rsgly', 'userParamManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705413603328', 'rsgly', 'loginLogManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705430380544', 'rsgly', 'roleMatrixManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705447157760', 'rsgly', 'matrixManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705472323584', 'rsgly', 'roleManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705501683712', 'rsgly', 'reportLine', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705518460928', 'rsgly', 'pwdStrategy', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705543626752', 'rsgly', 'heiOrganization', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705568792576', 'rsgly', 'scheduling', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705589764096', 'rsgly', 'holidayManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705606541312', 'rsgly', 'shiftRuleManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705623318528', 'rsgly', 'tenant', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705644290048', 'rsgly', 'tenantTypeManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705669455872', 'rsgly', 'tenantManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705690427392', 'rsgly', 'tenantParamsManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163775647223808', 'lcgly', 'bpm_platform', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163775689166848', 'lcgly', 'designCenter', NULL, NULL, '-1');

--  zhangyx 数据报表管理字段字节加长
ALTER TABLE `form_data_template` 
MODIFY COLUMN `MANAGE_FIELD_` longtext CHARACTER SET utf8 COLLATE utf8_bin NULL COMMENT '管理字段' AFTER `CONDITION_FIELD_`;

--  zhangxw 2020-09-02 流程终止恢复消息通知模板
INSERT INTO PORTAL_SYS_MSG_TPL(ID_, NAME_, KEY_, TYPE_KEY_, IS_DEFAULT_, SUBJECT_, PLAIN_, HTML_, CREATE_BY_, CREATE_TIME_, CREATE_ORG_ID_, UPDATE_BY_, UPDATE_TIME_, SMS_TEMPLATE_NO_, VOICE_TEMPLATE_NO_, TENANT_ID_) VALUES ('20', '流程终止恢复默认', 'bpmrenewprocess-default', 'bpmrenewprocess', '1', '流程终止恢复通知', '流程实例终止恢复通知：${instSubject}，意见:${cause}。', '流程实例已恢复运行中状态<a href=\"#\">${instSubject}</a>，意见:${cause}。', null, null, null, null, null, null, null, '-1');

-- 2020-09-03 zhaoxiangyun 租户管理表新增应用端租户名称字段
ALTER TABLE UC_TENANT_MANAGE ADD COLUMN NAME_FRONT_ varchar(128) DEFAULT NULL COMMENT '应用端租户名称';

-- 2020-07-21 leijian 数据报表 新增表
CREATE TABLE `form_data_template_extend` (
  ID_ varchar(64) NOT NULL COMMENT '主键',
  CONTENT_ text COMMENT '提醒内容',
  COUNT_ varchar(64) DEFAULT NULL COMMENT '提醒次数',
  OBJ_ID_ varchar(2000) COMMENT '提醒对象ID',
  TYPE_OBJ_ varchar(64) DEFAULT NULL COMMENT '提醒内型',
  OBJ_NAME_ text COMMENT '提醒对象名称',
  RULE_ text COMMENT '提醒条件',
  TENANT_ID_ varchar(64) DEFAULT NULL COMMENT '租户Id',
  FORM_DATA_TEMPLATE_ID varchar(64) DEFAULT NULL,
  SUBJECT_ varchar(500) COMMENT '提醒主题',
  PRIMARY KEY (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='业务数据模板扩展';


CREATE TABLE `form_remind_data` (
  ID_ varchar(64) NOT NULL COMMENT '主键',
  CONTENT_ text COMMENT '提醒内容',
  COUNT_ varchar(64) DEFAULT NULL COMMENT '提醒次数',
  OBJ_ID_ varchar(2000) COMMENT '提醒对象ID',
  TYPE_OBJ_ varchar(64) DEFAULT NULL COMMENT '提醒类型',
  OPEM_TYPE varchar(64) DEFAULT NULL COMMENT '打开类型  数据报表 或者流程实例查看页面',
  OPEM_ID varchar(64) DEFAULT NULL COMMENT '流程实例Id 或者业务对象Id',
  TENANT_ID_ varchar(64) DEFAULT NULL COMMENT '租户Id',
  SUBJECT_ varchar(500) COMMENT '提醒主题',
  PRIMARY KEY (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='提醒业务对象';

-- 2020-07-21 wanghb 【流程定义】配置的紧急状态没有效果  关闭
UPDATE  PORTAL_SYS_PROPERTIES SET ENCRYPT = 0 WHERE ID = '18';

-- 2020-07-22 pangquan 移动端应用
CREATE TABLE `portal_app` (
  `ID_` varchar(64) NOT NULL COMMENT '主键',
  `NAME_` varchar(255) DEFAULT NULL COMMENT '应用名称',
  `CONTENT_` varchar(1000) DEFAULT NULL COMMENT '内容',
  `ICON_` varchar(255) DEFAULT NULL COMMENT '图标',
  `ICON_COLOR_` varchar(10) DEFAULT NULL COMMENT '图标颜色',
  `TYPE_ID_` varchar(64) DEFAULT NULL COMMENT '分类id',
  `TYPE_NAME_` varchar(255) DEFAULT NULL COMMENT '分类名称',
  `ENABLE_` int(1) DEFAULT NULL COMMENT '是否启用：0未启用，1已启用',
  `MODE_` int(1) DEFAULT NULL COMMENT '类型：1站内地址，2站外地址，3数据报表',
  `SN_` int(10) DEFAULT NULL COMMENT '排序',
  `CREATE_BY_` varchar(64) DEFAULT NULL COMMENT '创建人',
  `CREATE_TIME_` datetime DEFAULT NULL COMMENT '创建时间',
  `UPDATE_BY_` varchar(64) DEFAULT NULL COMMENT '更新人',
  `UPDATE_TIME_` datetime DEFAULT NULL COMMENT '更新时间',
  `TENANT_ID_` varchar(64) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='移动端应用';
-- 2020-07-22 pangquan 删除 移动端集成菜单
delete from portal_sys_menu where id_='1254651912154910720';
-- 2020-07-22 pangquan 添加 移动端集成、应用中心菜单
INSERT INTO `portal_sys_menu`(`ID_`, `PARENT_ID_`, `NAME_`, `ALIAS_`, `ACTIVE_TAB_`, `MENU_ICON_`, `OPENED_`, `SN_`, `TABS_STYLE_`, `PATH_`, `HREF_`, `TENANT_ID_`) VALUES ('1285866575999668224', '1254651824338767872', '移动端集成', 'mobileUnite', 'sysExternalUniteList', '', 1, 7, '', '-1.1.1254651824338767872.1285866575999668224.', '', '-1');
INSERT INTO `portal_sys_menu`(`ID_`, `PARENT_ID_`, `NAME_`, `ALIAS_`, `ACTIVE_TAB_`, `MENU_ICON_`, `OPENED_`, `SN_`, `TABS_STYLE_`, `PATH_`, `HREF_`, `TENANT_ID_`) VALUES ('1285866673655648256', '1285866575999668224', '移动端集成', 'sysExternalUniteList', '', '', 1, 1, '', '-1.1.1254651824338767872.1285866575999668224.1285866673655648256.', '', '-1');
INSERT INTO `portal_sys_menu`(`ID_`, `PARENT_ID_`, `NAME_`, `ALIAS_`, `ACTIVE_TAB_`, `MENU_ICON_`, `OPENED_`, `SN_`, `TABS_STYLE_`, `PATH_`, `HREF_`, `TENANT_ID_`) VALUES ('1285866737765584896', '1285866575999668224', '应用中心', 'appModelManager', '', '', 1, 2, '', '-1.1.1254651824338767872.1285866575999668224.1285866737765584896.', '', '-1');
-- 2020-07-22 pangquan 添加应用中心分类
INSERT INTO `portal_sys_type_group`(`ID_`, `GROUP_KEY_`, `NAME_`, `FLAG_`, `SN_`, `TYPE_`, `CREATE_BY_`, `CREATE_TIME_`, `CREATE_ORG_ID_`, `UPDATE_BY_`, `UPDATE_TIME_`) VALUES ('1285867753718288384', 'appType', '应用中心', 0, 0, 0, '1', '2020-07-22 17:22:18', '1', NULL, '0000-00-00 00:00:00');

-- 2020-07-23 yangxb 修改系统属性初始化数据
UPDATE `portal_sys_properties` SET `NAME` = '用户导入导出按钮显示' WHERE `ID` = '20';

-- 2020-07-23 lingpj 去掉报表草稿菜单
DELETE FROM PORTAL_SYS_MENU WHERE ID_ =  '1271725674687762432';


--  2020-7-23 张耀祥  新闻公告初始化数据
CREATE TABLE `portal_news_notice_`  (
  `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
  `CLASSIFY_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '所属分类ID',
  `CLASSIFY_NAME_` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '所属分类NAME',
  `CLASSIFY_PATH_` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '所属分类路径',
  `TITLE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '标题',
  `IS_URL_` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '是否外部链接(true为是,false为不是)',
  `URL_` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '内容URL',
  `CONTENT_` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '内容',
  `SN_` int(255) DEFAULT NULL COMMENT '排序',
  `END_TIME_` datetime(0) DEFAULT NULL COMMENT '过期时间',
  `ROTATING_DISPLAY_PICTURES_` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '轮播展示图片',
  `TITLE_DESCRIPTION_` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '标题描述',
  `PAGE_HEIGHT_` double DEFAULT NULL COMMENT '页面嵌套高度',
  `TENANT_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '租户ID',
  `CREATE_TIME_` datetime(0) DEFAULT NULL COMMENT '创建时间',
  `CREATE_BY_` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建人',
  `UPDATE_TIME_` datetime(0) DEFAULT NULL COMMENT '更新时间',
  `UPDATE_BY_` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '更新人',
  `TYPE_` int(255) DEFAULT NULL COMMENT '所属类型(1为轮播图,2为新闻公告)',
  `ICON_` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '图标',
  `FILE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '附件',
  `DRAFTER_` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '拟稿人',
  PRIMARY KEY (`ID_`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;

SET FOREIGN_KEY_CHECKS = 1;


CREATE TABLE `portal_news_tree_`  (
  `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
  `NAME_` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '名称',
  `PATH_` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '路径',
  `PARENT_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '上级id',
  `RANK_` int(255) DEFAULT NULL COMMENT '级别(总共有3级)',
  `SN_` int(255) DEFAULT NULL COMMENT '排序',
  `PARENT_NAME_` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '路径名称',
  `TENANT_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '租户ID',
  `CREATE_TIME_` datetime(0) DEFAULT NULL COMMENT '创建时间',
  `CREATE_BY_` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建人',
  `UPDATE_TIME_` datetime(0) DEFAULT NULL COMMENT '更新时间',
  `UPDATE_BY_` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '更新人',
  `COL_HEIGHT_` int(11) DEFAULT NULL COMMENT '高度',
  `COLUMN_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '首页栏目ID',
  `INTERVAL_TIME_` int(11) DEFAULT NULL COMMENT '轮播图间隔时间',
  PRIMARY KEY (`ID_`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;

SET FOREIGN_KEY_CHECKS = 1;


-- 创建一个新闻公告的菜单
INSERT INTO `portal_sys_menu`(`ID_`, `PARENT_ID_`, `NAME_`, `ALIAS_`, `ACTIVE_TAB_`, `MENU_ICON_`, `OPENED_`, `SN_`, `TABS_STYLE_`, `PATH_`, `HREF_`, `TENANT_ID_`) VALUES ('1278989818835111936', '3711006', '新闻公告', 'portalNewsNoticeManager', NULL, NULL, '1', '3', NULL, '-1.1.3441002.3711006.1278989818835111936.', NULL, '-1');

-- 新闻公告树分类的初始化数据
INSERT INTO PORTAL_NEWS_TREE_ ( ID_, NAME_, PATH_, PARENT_ID_, RANK_, SN_, PARENT_NAME_, TENANT_ID_, CREATE_TIME_, CREATE_BY_, UPDATE_TIME_, UPDATE_BY_ )
VALUES
	( '100', '新闻公告', '100.', '0', 1, 0, NULL, '-1', NULL, '1', NULL, '1' );
INSERT INTO PORTAL_NEWS_TREE_ ( ID_, NAME_, PATH_, PARENT_ID_, RANK_, SN_, PARENT_NAME_, TENANT_ID_, CREATE_TIME_, CREATE_BY_, UPDATE_TIME_, UPDATE_BY_ )
VALUES
	( '200', '轮播图', '200.', '0', 1, 0, NULL, '-1', NULL, '1', NULL, NULL );
	

-- 2020-07-23 zhangxw 流程打印文件管理表
CREATE TABLE bpm_print_record  (
  ID_ varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
  PROC_DEF_KEY_ varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '流程定义KEY',
  PROC_DEF_NAME_ varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '流程定义名称',
  PROC_DEF_ID_ varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '流程定义ID',
  PROC_INST_ID_ varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '流程实例ID',
  NODE_ID_ varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '流程节点ID',
  FORM_KEY_ varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '表单key',
  TEMPLATE_ID_ varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '打印模板ID',
  TEMPLATE_NAME_ varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '打印模板名称',
  FILE_ID_ varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '打印文件id',
  LAST_VERSION_ int(2) NULL DEFAULT 0 COMMENT '是否最后的版本（1：是，0：否）',
  CREATE_BY_ varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  CREATE_ORG_ID_ varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  CREATE_TIME_ datetime(0) NULL DEFAULT NULL,
  UPDATE_BY_ varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  UPDATE_TIME_ datetime(0) NULL DEFAULT NULL,
  TENANT_ID_ varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '租户ID',
  PRIMARY KEY (ID_) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '流程打印文件管理表' ROW_FORMAT = Dynamic;

-- 2020-07-23 zhangxw 管理端添加打印记录菜单
INSERT INTO portal_sys_menu(ID_, PARENT_ID_, NAME_, ALIAS_, ACTIVE_TAB_, MENU_ICON_, OPENED_, SN_, TABS_STYLE_, PATH_, HREF_, TENANT_ID_) VALUES ('1264181442355793920', '4171077', '打印记录', 'printRecordManager', '', '', 1, 3, '', '-1.1.3641025.4171077.1264181442355793920.', '', '-1');


-- 2020-07-23 zhangxw 扩展登录统计表
CREATE TABLE uc_login_log  (
  ID_ varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键，用户id',
  NAME_ varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名',
  ACCOUNT_ varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户账号',
  IP_ varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '登录IP',
  LOGIN_TYPE_ varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '登录类型（pc：电脑端登录，mobile：移动端登录）',
  PC_SUM_ int(10) NULL DEFAULT 0 COMMENT 'PC端登录次数',
  MOBILE_SUM_ int(10) NULL DEFAULT 0 COMMENT '移动端登录次数',
  LOGIN_SUM_ int(10) NULL DEFAULT NULL COMMENT '登录次数',
  CREATE_BY_ varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
  CREATE_TIME_ datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
  UPDATE_TIME_ datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
  CREATE_ORG_ID_ varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人所属部门id',
  UPDATE_BY_ varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人id',
  TENANT_ID_ varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '租户id',
  IS_DELE_ char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  VERSION_ int(11) NULL DEFAULT NULL COMMENT '版本号',
  PRIMARY KEY (ID_) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户登录日志表' ROW_FORMAT = Dynamic;


-- 2020-07-23 zhangxw 扩展登录统菜单
INSERT INTO portal_sys_menu(ID_, PARENT_ID_, NAME_, ALIAS_, ACTIVE_TAB_, MENU_ICON_, OPENED_, SN_, TABS_STYLE_, PATH_, HREF_, TENANT_ID_) VALUES ('1273944053116964864', '3441027', '登录统计', 'loginLogManager', '', '', 1, 3, '', '-1.1.3441009.3441027.1273944053116964864.', '', '-1');

-- 2020-07-24 qiuxd 添加汇总字段
ALTER TABLE FORM_DATA_TEMPLATE ADD SUMMARY_FIELD_ LONGTEXT DEFAULT NULL;
ALTER TABLE FORM_QUERY_VIEW ADD SUMMARY_SETTING_ LONGTEXT DEFAULT NULL;

-- 2020-07-26 张先稳 添加表portal_flow_upload_properties（流程附件上传配置表）
CREATE TABLE portal_flow_upload_properties  (
  ID_ varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
  NAME_ varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '名称',
  FLOW_KEY_ text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '流程key',
  FLOW_NAME_ text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '流程名称',
  UPLOAD_TYPE_ varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '上传方式：可用参数值：database（保存在数据库），folder（保存在服务器文件目录）；ftp（上传到ftp）',
  LOCATION_ varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件存储位置（存储方式为folder时需指定）',
  FTP_URL_ varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'ftp上传地址',
  FTP_PORT_ int(11) NULL DEFAULT NULL COMMENT 'FTP端口号',
  FTP_USER_NAME_ varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'ftp认证用户名',
  FTP_PASSWORD_ varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'FTP认证用户密码',
  STATUS_ varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '状态：enable(生效)，disable（无效）',
  ENCRYPT_NAME_ int(11) NULL DEFAULT NULL COMMENT '文件名是否加密（1：加密，0：不加密）',
  DESC_ varchar(600) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '描述',
  UPDATE_TIME_ datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
  CREATE_BY_ varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人id',
  CREATE_TIME_ datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
  CREATE_ORG_ID_ varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人所属部门id',
  UPDATE_BY_ varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人id',
  TENANT_ID_ varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (ID_) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '流程附件上传配置' ROW_FORMAT = Dynamic;

-- 2020-07-26 张先稳 添加菜单：流程附件配置
INSERT INTO portal_sys_menu(ID_, PARENT_ID_, NAME_, ALIAS_, ACTIVE_TAB_, MENU_ICON_, OPENED_, SN_, TABS_STYLE_, PATH_, HREF_, TENANT_ID_) VALUES ('1287308260197666816', '3761202', '流程附件配置', 'flowUploadProperties', '', '', 1, 4, '', '-1.1.3641025.3761202.1287308260197666816.', '', '-1');

-- 2020-07-27 黎扬贵 数据敏感管理
INSERT INTO `portal_sys_menu`(`ID_`, `PARENT_ID_`, `NAME_`, `ALIAS_`, `ACTIVE_TAB_`, `MENU_ICON_`, `OPENED_`, `SN_`, `TABS_STYLE_`, `PATH_`, `HREF_`, `TENANT_ID_`) VALUES ('1287699251299749888', '3421053', '数据敏感管理', 'portalDataSensitiveManager', '', '', 1, 10, '', '-1.1.3421053.1287699251299749888.', '', '-1');

-- 2020-07-27 黎扬贵 数据敏感管理
CREATE TABLE `portal_data_sensitive`  (
  `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
  `DATA_SOURCE_ALIAS_` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据源别名',
  `TABLE_NAME_` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '表名',
  `REULES_REMARK_` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '规则说明',
  `DESENSITIZATION_RULES_` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '脱敏规则[{fieldName:\"mobile\",rules: {start:1,end:null,replaceChar:\'*\'},groovyScript:\"\",rights:[{}]}]',
  `TENANT_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`ID_`) USING BTREE,
  UNIQUE INDEX `idx_dsa_tn_unique`(`DATA_SOURCE_ALIAS_`, `TABLE_NAME_`) USING BTREE COMMENT '数据库别名和表名联合唯一索引'
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '表字段脱敏处理' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;



-- 2020-08-05 邱喜达 角色矩阵
UPDATE PORTAL_SYS_MENU SET NAME_ = '角色矩阵管理',ALIAS_ = 'roleMatrixManager' WHERE ID_ = '3441030';
INSERT INTO PORTAL_SYS_MENU(ID_, PARENT_ID_, NAME_, ALIAS_, ACTIVE_TAB_, MENU_ICON_, OPENED_, SN_, TABS_STYLE_, PATH_, HREF_, TENANT_ID_) VALUES ('1290961424914452480', '3441030', '角色管理', 'roleManager', '', '', 1, 3, '', '-1.1.3441009.3441030.1290961424914452480.', NULL, '-1');
INSERT INTO PORTAL_SYS_MENU(ID_, PARENT_ID_, NAME_, ALIAS_, ACTIVE_TAB_, MENU_ICON_, OPENED_, SN_, TABS_STYLE_, PATH_, HREF_, TENANT_ID_) VALUES ('1290961558574338048', '3441030', '矩阵管理', 'matrixManager', '', '', 1, 2, '', '-1.1.3441009.3441030.1290961558574338048.', NULL, '-1');

-- 2020-08-06 wanghb 
ALTER TABLE form_data_import_log ADD COLUMN BO_ALIAS_  VARCHAR(64)   NULL COMMENT 'bo别名';

-- 2020-08-11 pangquan 用户表添加设备信息，用于app推送
ALTER TABLE `uc_user` 
ADD COLUMN `CLIENT_ID_` varchar(255) NULL COMMENT '推送服务令牌（设备唯一标识）' AFTER `PWD_CREATE_TIME_`,
ADD COLUMN `CLIENT_TOKEN_` varchar(255) NULL COMMENT '设备令牌（iOS设备唯一标识）' AFTER `CLIENT_ID_`;

-- 2020-08-11 yangxb 应用中心添加默认分类
INSERT INTO `portal_sys_type` VALUES ('1293129463957164032', 'appType', '默认分类', 'mrfl', '0', '1285867753718288384', 1, '1285867753718288384.1293129463957164032.', 'Y', '0', 0, '1', '2020-08-11 18:17:44', '', NULL, NULL, NULL, '-1');

-- 2020-08-12 邱喜达
ALTER TABLE BPM_TASK_REMINDER ADD COLUMN SEND_USER_ID_ VARCHAR(64) NULL COMMENT '发送个人ID';

INSERT INTO PORTAL_SYS_TYPE_GROUP(`ID_`, `GROUP_KEY_`, `NAME_`, `FLAG_`, `SN_`, `TYPE_`, `CREATE_BY_`, `CREATE_TIME_`, `CREATE_ORG_ID_`, `UPDATE_BY_`, `UPDATE_TIME_`) VALUES ('1285467330515701760', 'jzfl', '矩阵分类', 0, 0, 0, '1', '2020-08-13 09:54:06', NULL, NULL, '2020-08-13 09:54:06');

CREATE TABLE `uc_shift_rule` (
  `ID_` varchar(64) NOT NULL COMMENT '主键',
  `NAME_` varchar(128) DEFAULT NULL COMMENT '名称',
  `KEY_` varchar(128) DEFAULT NULL COMMENT 'KEY',
  `DESC_` text COMMENT '描述',
  `RULE_` longtext COMMENT '规则',
  `HOLIDAY_ID_` varchar(64) DEFAULT NULL COMMENT '节假日ID',
  `IS_DELE_` smallint(1) DEFAULT NULL COMMENT '是否删除 1删除 0未删除',
  `CREATE_TIME_` datetime DEFAULT NULL COMMENT '创建时间',
  `UPDATE_TIME_` datetime DEFAULT NULL COMMENT '更新时间',
  `CREATE_BY_` varchar(64) DEFAULT NULL COMMENT '创建人',
  `UPDATE_BY_` varchar(64) DEFAULT NULL COMMENT '更新人',
  `CREATE_ORG_ID_` varchar(64) DEFAULT NULL COMMENT '创建人组织ID',
  `TENANT_ID_` varchar(64) DEFAULT NULL COMMENT '租户ID',
  `VERSION_` int(11) DEFAULT NULL COMMENT '版本',
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='排班规则';

CREATE TABLE `uc_shift_user` (
  `ID_` varchar(64) NOT NULL COMMENT '主键',
  `USER_ID_` varchar(64) DEFAULT NULL COMMENT '用户ID',
  `SHIFT_ID_` varchar(64) DEFAULT NULL COMMENT '排班ID',
  `TENANT_ID_` varchar(64) DEFAULT NULL COMMENT '租户ID',
  `IS_DELE_` smallint(1) DEFAULT NULL COMMENT '是否已删，1已删除，0未删除',
  `VERSION_` int(11) DEFAULT NULL COMMENT '版本',
  `CREATE_BY_` varchar(64) DEFAULT NULL COMMENT '创建人ID',
  `UPDATE_BY_` varchar(64) DEFAULT NULL COMMENT '更新人ID',
  `CREATE_TIME_` datetime DEFAULT NULL COMMENT '创建时间',
  `UPDATE_TIME_` datetime DEFAULT NULL COMMENT '更新时间',
  `CREATE_ORG_ID_` varchar(64) DEFAULT NULL COMMENT '创建者所属组织ID',
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `uc_holiday` (
  `ID_` varchar(64) NOT NULL COMMENT '主键',
  `NAME_` varchar(128) DEFAULT NULL COMMENT '节日名称',
  `KEY_` varchar(128) DEFAULT NULL COMMENT '节日KEY',
  `DESC_` text COMMENT '描述',
  `IS_DELE_` smallint(1) DEFAULT NULL COMMENT '是否已删，1已删除，0未删除',
  `CREATE_TIME_` datetime DEFAULT NULL COMMENT '创建时间',
  `UPDATE_TIME_` datetime DEFAULT NULL COMMENT '更新时间',
  `CREATE_BY_` varchar(64) DEFAULT NULL COMMENT '创建人ID',
  `UPDATE_BY_` varchar(64) DEFAULT NULL COMMENT '更新人ID',
  `CREATE_ORG_ID_` varchar(64) DEFAULT NULL COMMENT '创建组织ID',
  `VERSION_` int(11) DEFAULT NULL COMMENT '版本',
  `TENANT_ID_` varchar(64) DEFAULT NULL COMMENT '租户ID',
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='法定节假日';

CREATE TABLE `uc_holiday_time` (
  `ID_` varchar(64) NOT NULL COMMENT '主键',
  `START_TIME_` datetime DEFAULT NULL COMMENT '假期开始时间',
  `END_TIME_` datetime DEFAULT NULL COMMENT '假期结束时间',
  `HOLIDAY_ID_` varchar(64) DEFAULT NULL COMMENT '假期ID',
  `TENANT_ID_` varchar(64) DEFAULT NULL COMMENT '租户ID',
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='假期时间';

INSERT INTO PORTAL_SYS_MENU(`ID_`, `PARENT_ID_`, `NAME_`, `ALIAS_`, `ACTIVE_TAB_`, `MENU_ICON_`, `OPENED_`, `SN_`, `TABS_STYLE_`, `PATH_`, `HREF_`, `TENANT_ID_`) VALUES ('1290200609563217920', '3441009', '排班管理', 'scheduling', '', '', 1, 8, '', '-1.1.3441009.1290200609563217920.', '', '-1');
INSERT INTO PORTAL_SYS_MENU(`ID_`, `PARENT_ID_`, `NAME_`, `ALIAS_`, `ACTIVE_TAB_`, `MENU_ICON_`, `OPENED_`, `SN_`, `TABS_STYLE_`, `PATH_`, `HREF_`, `TENANT_ID_`) VALUES ('1290200842779103232', '1290200609563217920', '法定假期', 'holidayManager', '', '', 1, 1, '', '-1.1.3441009.1290200609563217920.1290200842779103232.', '', '-1');
INSERT INTO PORTAL_SYS_MENU(`ID_`, `PARENT_ID_`, `NAME_`, `ALIAS_`, `ACTIVE_TAB_`, `MENU_ICON_`, `OPENED_`, `SN_`, `TABS_STYLE_`, `PATH_`, `HREF_`, `TENANT_ID_`) VALUES ('1290565469010530304', '1290200609563217920', '轮班规则', 'shiftRuleManager', '', '', 1, 2, '', '-1.1.3441009.1290200609563217920.1290565469010530304.', '', '-1');

-- 2020-08-14 tangxin PORTAL_SYS_DATASOURCE表字段去掉默认值
alter table PORTAL_SYS_DATASOURCE alter INIT_METHOD_ set default null;
alter table PORTAL_SYS_DATASOURCE alter CLOSE_METHOD_ set default null;
alter table PORTAL_SYS_DATASOURCE alter NAME_ set default null;

-- 2020/8/15 邱喜达
CREATE TABLE `portal_sys_tag` (
  `ID_` varchar(64) NOT NULL COMMENT '主键',
  `TYPE_ID_` varchar(64) DEFAULT NULL COMMENT '分类ID',
  `KEY_` varchar(40) DEFAULT NULL COMMENT '标签KEY',
  `NAME_` varchar(128) DEFAULT NULL COMMENT '标签名称',
  `SN_` int(11) DEFAULT NULL COMMENT '排序',
  `TENANT_ID_` varchar(64) DEFAULT NULL COMMENT '租户ID',
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO PORTAL_SYS_TYPE_GROUP(ID_, GROUP_KEY_, NAME_, FLAG_, SN_, TYPE_, CREATE_BY_, CREATE_TIME_, CREATE_ORG_ID_, UPDATE_BY_, UPDATE_TIME_) VALUES ('11', 'TAG', '标签分类', '1', '9', '1', null, null, null, '1', null);

ALTER TABLE FORM_RIGHT ADD COLUMN DATA_KEY_ VARCHAR(64) DEFAULT NULL COMMENT '数据报表Key';

INSERT INTO PORTAL_SYS_MENU(`ID_`, `PARENT_ID_`, `NAME_`, `ALIAS_`, `ACTIVE_TAB_`, `MENU_ICON_`, `OPENED_`, `SN_`, `TABS_STYLE_`, `PATH_`, `HREF_`, `TENANT_ID_`) VALUES ('1287643583943413760', '3631013', '系统标签', 'sysTagManager', '', '', 1, 4, '', '-1.1.3441002.3631013.1287643583943413760.', '', '-1');

-- 2020-08-14 黎扬贵 表单历史记录 添加表单key 和版本号字段
ALTER TABLE `form_history_record`
ADD COLUMN `FORM_KEY_` varchar(255) NULL COMMENT '表单key' AFTER `TENANT_ID_`,
ADD COLUMN `VERSION_` int(255) NULL COMMENT '版本' AFTER `FORM_KEY_`;

-- 2020-08-17 lingpj 调整 PORTAL_SYS_FILE 表 BYTES_ 字段类型
ALTER TABLE PORTAL_SYS_FILE MODIFY COLUMN BYTES_  LONGBLOB;

-- 2020-08-19 zhangxw 将form_bo_ent表应用多租户后需执行sql（将ent中租户id回填）
update form_bo_ent ent left JOIN form_bo_ent_relation rel on ent.id_=rel.REF_ENT_ID_
LEFT JOIN form_bo_def def on rel.BO_DEFID_=def.ID_
set ent.tenant_id_=def.tenant_id_;

-- 2020-08-20 赵祥云 业务数据模板表新增前置groovy脚本字段和后置groovy脚本字段
ALTER TABLE FORM_DATA_TEMPLATE ADD COLUMN BEFORE_SCRIPT_ LONGTEXT NULL COMMENT '前置groovy脚本';
ALTER TABLE FORM_DATA_TEMPLATE ADD COLUMN AFTER_FCRIPT_ LONGTEXT NULL COMMENT '后置groovy脚本';

-- 2020-09-04 流程仿真 字段不够长
ALTER TABLE bpm_test_case
MODIFY COLUMN FLOW_VARS_ varchar(4000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '流程变量' AFTER BO_FORM_DATA_,
MODIFY COLUMN ACTION_TYPE_ varchar(4000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '审批动作， 默认动作时 agree' AFTER FLOW_VARS_,
MODIFY COLUMN BPM_DEBUGGER_ varchar(4000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '断点测试设置' AFTER STARTOR_;

-- 2020-09-04 紧急程度没有显示的问题修改
UPDATE portal_sys_properties SET NAME = '紧急状态配置', ALIAS = 'urgentStateConf', GROUP_ = NULL, VALUE = '[{state:\"1\",name:\"非常紧急\",color:\"red\" }, {state:\"2\",name:\"比较紧急\",color:\"#e6a23c\" },{state:\"3\",name:\"一般\",color:\"#5daf34\",default:true}]', ENCRYPT = 0, DESCRIPTION = '', UPDATE_TIME_ = NULL, CREATE_BY_ = NULL, CREATE_TIME_ = NULL, CREATE_ORG_ID_ = NULL, UPDATE_BY_ = NULL, TENANT_ID_ = '-1' WHERE ID = '18';

-- 2020-09-04 更新移动端数据台
UPDATE portal_sys_column SET NAME = '移动端数据台', ALIAS = 'yddsj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iKDI1NSwgMjU1LCAyNTUpOyI+PC9zcGFuPgogICAgPC9kaXY+CiAgIDwvZGl2PiAgICAgCiAgIDxkaXYgc3R5bGU9InBhZGRpbmctbGVmdDo1cHgiPiA8c3BhbiBzdHlsZT0iZm9udC1zaXplOjEycHg7Zm9udC1mYW1pbHk6TWljcm9zb2Z0IFlhSGVpO2ZvbnQtd2VpZ2h0OjQwMDtjb2xvcjpyZ2JhKDE0NSwxNDUsMTQ1LDEpO2xpbmUtaGVpZ2h0OjMwcHg7Ij7mlrDlu7rmtYHnqIs8L3NwYW4+PC9kaXY+CiAgIDwvcm91dGVyLWxpbms+CiAgICA8L2Rpdj4KICA8L2VsLWNvbD4KPC9lbC1yb3c+CjwvZGl2Pg==', IS_PUBLIC = 1, SUPPORT_REFESH = NULL, REFESH_TIME = NULL, SHOW_EFFECT = NULL, MEMO = '', DATA_PARAM = '', NEEDPAGE = 0, ORG_ID = NULL, CREATOR = NULL, CREATE_BY_ = NULL, UPDATE_BY_ = '1', CREATE_TIME_ = NULL, UPDATE_TIME_ = '2020-09-05 11:03:27', REQUEST_TYPE = 'GET', CATALOG_NAME = '', CREATE_ORG_ID_ = NULL, TENANT_ID_ = '-1' WHERE ID = '1267991710768697344';

-- 2020-09-05 李洪桥 将菜单应用中心改成移动端应用中心
UPDATE portal_sys_menu SET NAME_='移动端应用中心' WHERE ID_='1285866737765584896';


-- 2020-09-05 提醒设置增加外键
alter table form_remind_data
	add REF_ID_ VARCHAR(64) null comment '外键';
	
-- 2020-9-8 流程水印 qiuxd
CREATE TABLE bpm_watermark (
  ID_ varchar(64) NOT NULL COMMENT '主键',
  NAME_ varchar(128) DEFAULT NULL COMMENT '名称',
  CONTENT_ text COMMENT '内容',
  TYPE_ smallint(2) DEFAULT NULL COMMENT '类型 1文字 2图片',
  COLOR_ varchar(32) DEFAULT NULL COMMENT '颜色 透明度',
  AMOUNT_ int(10) DEFAULT NULL COMMENT '页面展示数量',
  CREATE_TIME_ datetime DEFAULT NULL COMMENT '创建时间',
  CREATE_BY_ varchar(64) DEFAULT NULL COMMENT '创建人',
  UPDATE_TIME_ datetime DEFAULT NULL COMMENT '更新时间',
  UPDATE_BY_ varchar(64) DEFAULT NULL COMMENT '更新人',
  CREATE_ORG_ID_ varchar(64) DEFAULT NULL COMMENT '创建人组织ID',
  TENANT_ID_ varchar(64) DEFAULT NULL COMMENT '租户ID',
  PRIMARY KEY (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='流程水印';

CREATE TABLE bpm_watermark_type (
  ID_ varchar(64) NOT NULL COMMENT '主键',
  TYPE_ID_ varchar(64) DEFAULT NULL COMMENT '分类ID',
  WATERMARK_ID_ varchar(64) DEFAULT NULL COMMENT '水印ID',
  TYPE_NAME_ varchar(256) DEFAULT NULL COMMENT '分类名称',
  TENANT_ID_ varchar(64) DEFAULT NULL COMMENT '租户ID',
  PRIMARY KEY (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='水印分配分类';

INSERT INTO PORTAL_SYS_MENU(ID_, PARENT_ID_, NAME_, ALIAS_, ACTIVE_TAB_, MENU_ICON_, OPENED_, SN_, TABS_STYLE_, PATH_, HREF_, TENANT_ID_) VALUES ('1303147346326065152', '3761202', '流程水印', 'watermarkManager', '', '', NULL, 5, '', '-1.1.3641025.3761202.1303147346326065152.', '', '-1');

-- 2020-09-09 lingpj 流程水印菜单授权
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1303524385981861888', 'xtgly', 'watermarkManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1303524446065266688', 'lcgly', 'watermarkManager', NULL, NULL, '-1');

-- 2020-09-09 qiuxd 催办历史添加taskID
ALTER TABLE BPM_REMINDER_HISTORY ADD TASK_ID_ VARCHAR(64) NOT NULL;

-- 2020-09-10 李洪桥 移动端获取数据台信息调用getDefaultInfoMap接口（迁移海雅分支#58277）
UPDATE PORTAL_SYS_COLUMN SET DATA_FROM='${bpmRunTime}/runtime/instance/v1/getDefaultInfoMap' where ID = '1267991710768697344';

-- 2020-09-10 赵祥云 人员脚本 获取上一节点执行人的部门负责人新增一个参数（传维度id或编码都可以）
DELETE FROM BPM_MULTI_SCRIPT WHERE ID_='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 ('11', NULL, NULL, 'com.hotent.runtime.script.UserRelScript', 'userRelScript', 'getChargesByPreNode', '获取上一节点执行人的部门负责人', 'java.util.Set', '[{\"paraName\":\"arg0\",\"paraType\":\"java.lang.Boolean\",\"paraDesc\":\"是否主负责人\",\"paraCt\":\"\"},{\"paraName\":\"arg1\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"传维度id或编码都可以          \"}]', '1', '2', '-1');

