
ALTER TABLE `security_certificate`
ADD COLUMN `revokeDate`  varchar(20) NULL COMMENT '吊销日期' AFTER `rkkflag`;

ALTER TABLE `security_certificate`
ADD COLUMN `revokeOrg`  varchar(12) NULL COMMENT '吊销决定机构代码' AFTER `rkkflag`;

ALTER TABLE `security_certificate`
ADD COLUMN `revokeOrgName`  varchar(150) NULL COMMENT '吊销决定机构' AFTER `rkkflag`;

ALTER TABLE `security_certificate`
ADD COLUMN `revokeReason`  varchar(1000) NULL COMMENT '吊销原因' AFTER `rkkflag`;

ALTER TABLE `security_certificate`
ADD COLUMN `cancelOrg`  varchar(12) NULL COMMENT '撤销决定机构代码' AFTER `rkkflag`;

ALTER TABLE `security_certificate`
ADD COLUMN `cancelOrgName`  varchar(150) NULL COMMENT '撤销决定机构' AFTER `rkkflag`;

ALTER TABLE `security_certificate`
ADD COLUMN `cancelReason`  varchar(1000) NULL COMMENT '撤销原因' AFTER `rkkflag`;

ALTER TABLE `security_certificate`
ADD COLUMN `cancelDate`  varchar(20) NULL COMMENT '撤销日期' AFTER `rkkflag`;

ALTER TABLE `security_certificate`
ADD COLUMN `score`  varchar(5) NULL COMMENT '考试成绩' AFTER `rkkflag`;

ALTER TABLE `security_certificate`
ADD COLUMN `examDate`  varchar(20) NULL COMMENT '考试时间' AFTER `rkkflag`;

ALTER TABLE `security_certificate`
ADD COLUMN `state`  varchar(5) NULL COMMENT '证书状态 1正常2撤销3吊销' AFTER `rkkflag`;


ALTER TABLE `problemperson`
ADD COLUMN `comHandleDate`  datetime NULL COMMENT '企业处理时间' AFTER `handlerOrg`,
ADD COLUMN `handleDate`  datetime NULL COMMENT '公安机关处理时间' AFTER `comHandleDate`;


delete  from `sys_dict` where codeType = 'state';
INSERT INTO `sys_dict` (`sysDictId`, `isActive`, `codeType`, `tableName`, `description`, `codeValue`, `label`, `seq`) VALUES (null, '1', 'state', NULL, '保安证状态', '1', '正常', '1');
INSERT INTO `sys_dict` (`sysDictId`, `isActive`, `codeType`, `tableName`, `description`, `codeValue`, `label`, `seq`) VALUES (null, '1', 'state', NULL, '保安证状态', '2', '撤消', '2');
INSERT INTO `sys_dict` (`sysDictId`, `isActive`, `codeType`, `tableName`, `description`, `codeValue`, `label`, `seq`) VALUES (null, '1', 'state', '', '保安证状态', '3', '吊销', '3');

delete from sys_dict where codeType ='inform' and codeValue ='4';


ALTER TABLE `sb_personcertificate`
MODIFY COLUMN `id`  BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID' FIRST ;

ALTER TABLE `sys_approval`
MODIFY COLUMN `businessid`  bigint(20) NULL DEFAULT NULL COMMENT '业务ID' AFTER `businesstype`;

ALTER TABLE `security_certificate`
MODIFY COLUMN `securitypersonid`  bigint(20) NULL DEFAULT NULL COMMENT '保安员资格证申报ID' AFTER `zzzt`;

ALTER TABLE `sb_family`
MODIFY COLUMN `personcertificateid`  bigint(20) NULL DEFAULT NULL COMMENT '保安员证申请ID' AFTER `post`;


ALTER TABLE `sb_personworkexperience`
MODIFY COLUMN `personcertificateid`  bigint(20) NULL DEFAULT NULL COMMENT '保安员证申请ID' AFTER `post`;


ALTER TABLE `sb_personcertificate`
MODIFY COLUMN `nowAddress`  varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '现住地址' AFTER `healthStatus`;


