CREATE TABLE `zh_notice` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `type` int(11) NOT NULL COMMENT '推送的类型',
  `uid` int(11) NOT NULL COMMENT '接收者id',
  `status` int(11) NOT NULL COMMENT '状态',
  `is_read` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否已读，0：未读，1：已读',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `pid` int(11) NOT NULL COMMENT '项目id',
  `content` text COLLATE utf8_unicode_ci NOT NULL COMMENT '推送必要的查询字段，如 ''{tid, mid}''',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='关注推送表';
SELECT * FROM calculation.zh_notice;

-- ----------------------------
-- 以上于2020-7-29 18:00 因更新至prod，尚未更新uat，如需增加sql，请一定在其后添加
-- ----------------------------

ALTER TABLE `zh_ledger`
ADD COLUMN `gxby_status`  tinyint(4) NULL DEFAULT 0 COMMENT '工序报验-状态' AFTER `qtcl_expr`,
ADD COLUMN `dagl_status`  tinyint(4) NULL DEFAULT 0 COMMENT '档案管理-状态' AFTER `gxby_status`;

ALTER TABLE `zh_pos`
ADD COLUMN `gxby_status`  int(4) NULL DEFAULT 0 COMMENT '工序报验-状态' AFTER `real_qty`,
ADD COLUMN `dagl_status`  int(4) NULL DEFAULT 0 COMMENT '档案管理-状态' AFTER `gxby_status`;

ALTER TABLE `calculation`.`zh_notice`
DROP COLUMN `is_read`;

ALTER TABLE `zh_tender`
ADD COLUMN `uuid`  varchar(50) CHARACTER SET ascii COLLATE ascii_general_ci NULL DEFAULT NULL COMMENT 'uuid' AFTER `deal_tp`;

CREATE TABLE `zh_s2b_log` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `pid` int(11) NOT NULL COMMENT '项目id',
  `tid` int(11) NOT NULL COMMENT '标段id',
  `url` varchar(255) CHARACTER SET utf8 NOT NULL COMMENT '请求url',
  `post_data` text CHARACTER SET utf8 COMMENT '请求数据',
  `post_data_file` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '请求数据文件(部分请求可能数据量比较大，以文件形式存储)',
  `result_data` text COLLATE utf8_unicode_ci,
  `result_data_file` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '结果数据文件(部分请求结果可能数据量比较大，以文件形式存储)',
  `post_time` datetime DEFAULT NULL COMMENT '请求时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
