-- 2020-9-29 pagnq 修改栏目的分类id字段类型
ALTER TABLE `portal_sys_column` 
MODIFY COLUMN `CATALOG` varchar(64) NULL DEFAULT NULL AFTER `ALIAS`;

-- 2020-06-29 lingpj 修改表单历史记录HTML字段类型
ALTER TABLE FORM_HISTORY_RECORD
MODIFY COLUMN FORM_HTML_  LONGTEXT CHARACTER SET UTF8 AFTER FORM_ID_;

-- 2020-7-1 yangxb 修改人员脚本初始化数据
UPDATE BPM_MULTI_SCRIPT SET ARGUMENT_ =  '[{\"paraName\":\"arg1\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"类型ID\",\"paraCt\":\"\",\"paraCtBindName\":\"ID_\",\"paraCtBindKey\":\"\",\"multiSelect\":false}]' WHERE ID_ = '12';
UPDATE BPM_MULTI_SCRIPT SET ARGUMENT_ = '[{\"paraName\":\"arg1\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"类型ID\",\"paraCt\":\"cusdg:yhgxflxz\",\"paraCtBindName\":\"ID_\",\"paraCtBindKey\":\"ID_\",\"multiSelect\":false}]' WHERE ID_ = '13';

-- 2020-07-01 lingpj  BPM_CUSTOM_SIGNDATA 表添加 IS_READ_ 字段
ALTER TABLE BPM_CUSTOM_SIGNDATA
ADD COLUMN IS_READ_ SMALLINT DEFAULT NULL COMMENT '是否已读';

-- 2020-06-29 wanghb 表form_data_template添加filtering_field_字段
ALTER TABLE form_data_template ADD COLUMN filtering_field_  LONGTEXT  NULL COMMENT '排序字段';

-- 06-22 wanghb新增数据导入日志表
CREATE TABLE form_data_import_log (
  ID_ varchar(64) NOT NULL,
  P_ID_ varchar(64) DEFAULT NULL,
  ROW_NUMBER_ int(11) DEFAULT NULL COMMENT '错误行号',
  COLUMN_NAME_ varchar(64) DEFAULT NULL COMMENT '错误列名',
  ERROR_MSG_ text COMMENT '错误信息',
  tenant_id_ varchar(64) DEFAULT NULL,
  PRIMARY KEY (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 07-13 lingpj 流程定义数据表字段调整
ALTER TABLE BPM_DEF_DATA
MODIFY COLUMN DEF_XML_  LONGTEXT CHARACTER SET UTF8;
ALTER TABLE BPM_DEF_DATA
MODIFY COLUMN DEF_JSON_  LONGTEXT CHARACTER SET UTF8;

-- 07-14 lingpj 栏目设置固定高度
UPDATE PORTAL_SYS_COLUMN SET COL_HEIGHT = 80 WHERE ID = '1267766070928871424';
UPDATE PORTAL_SYS_COLUMN SET COL_HEIGHT = 432 WHERE ID = '1267778617740496896';
UPDATE PORTAL_SYS_COLUMN SET COL_HEIGHT = 250 WHERE ID = '1267789335860744192';
UPDATE PORTAL_SYS_COLUMN SET COL_HEIGHT = 147 WHERE ID = '1267779342914686976';
UPDATE PORTAL_SYS_COLUMN SET COL_HEIGHT = 115 WHERE ID = '1267788861858254848';
UPDATE PORTAL_SYS_COLUMN SET COL_HEIGHT = 147 WHERE ID = '1267789510905827328';
UPDATE PORTAL_SYS_COLUMN SET COL_HEIGHT = 60 WHERE ID = '1267991368769343488';
UPDATE PORTAL_SYS_COLUMN SET COL_HEIGHT = 180 WHERE ID = '1267991710768697344';
UPDATE PORTAL_SYS_COLUMN SET COL_HEIGHT = 330 WHERE ID = '1267991917208145920';
UPDATE PORTAL_SYS_COLUMN SET COL_HEIGHT = 250 WHERE ID = '1267997325486329856';
UPDATE PORTAL_SYS_COLUMN SET COL_HEIGHT = 100 WHERE ID = '1267788067230584832';
UPDATE PORTAL_SYS_COLUMN SET COL_HEIGHT = 250 WHERE ID = '1267778861031100416';
UPDATE PORTAL_SYS_COLUMN SET COL_HEIGHT = 250 WHERE ID = '1267779135086923776';
UPDATE PORTAL_SYS_COLUMN SET COL_HEIGHT = 250 WHERE ID = '1267788537730830336';

-- 07-17 lingpj 栏目数据转义调整
UPDATE PORTAL_SYS_COLUMN SET DATA_PARAM = '[{"name":"pageBean","type":"string","mode":"0","value":"{\\"page\\":1,\\"pageSize\\":7,\\"total\\":0,\\"showTotal\\":false}"}]' WHERE ID = '1267768754310352896';
UPDATE PORTAL_SYS_COLUMN SET DATA_PARAM = '[{"name":"pageBean","type":"string","mode":"0","value":"{\\"page\\":1,\\"pageSize\\":7,\\"total\\":0,\\"showTotal\\":false}"}]' WHERE ID = '1267777395872632832';


-- 2020.7.17 yangxb 模块开发分类下添加默认分类
INSERT INTO `portal_sys_type`(`ID_`, `TYPE_GROUP_KEY_`, `NAME_`, `TYPE_KEY_`, `STRU_TYPE_`, `PARENT_ID_`, `DEPTH_`, `PATH_`, `IS_LEAF_`, `OWNER_ID_`, `SN_`, `CREATE_BY_`, `CREATE_TIME_`, `CREATE_ORG_ID_`, `UPDATE_BY_`, `UPDATE_TIME_`, `ICON_`, `TENANT_ID_`) VALUES ('1283971957552975872', 'SYSMODULE', '默认分类', 'default', '0', '10', 1, '10.1283971957552975872.', 'Y', '0', 0, '1', NULL, '', NULL, NULL, NULL, '-1');

-- 2020-07-17 liyg 该表有多个主键 只保留id_主键
ALTER TABLE bpm_bus_link
DROP PRIMARY KEY,
ADD PRIMARY KEY (ID_);


