ALTER TABLE `zh_project_account` ADD `wx_unionid` VARCHAR(50) NULL COMMENT '微信绑定unionid(同一个开放平台共用)' AFTER `wx_openid`;

--
-- 报表归档表
--
CREATE TABLE `calculation`.`zh_rpt_archive` (
  `archive_id` INT NOT NULL,
  `prj_id` INT NULL,
  `stage_id` INT NULL,
  `content` VARCHAR(4000) NULL,
  PRIMARY KEY (`archive_id`),
  INDEX `PRJ_STG` (`prj_id` ASC, `stage_id` ASC))
COMMENT = '报表归档表;\n只考虑项目id及期id，其他信息全部归入content';

-- 项目设置-功能设置
ALTER TABLE `zh_project`
ADD COLUMN `fun_rela`  varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '功能设置(json.stringify)' AFTER `rpt_nature`;


ALTER TABLE `zh_ledger_cooperation` ADD `company` VARCHAR(100) NOT NULL DEFAULT '' COMMENT '单位或备注名，筛选用' AFTER `sign_path`;

ALTER TABLE `zh_advance_audit` 
CHANGE COLUMN `type` `type` TINYINT(1) NOT NULL DEFAULT '0' COMMENT '预付款类型，0为开工预付款，1为材料预付款，2为安全生产费预付款' ;

ALTER TABLE `zh_advance_pay` 
CHANGE COLUMN `type` `type` INT(1) NOT NULL DEFAULT '0' COMMENT '预付款类型，0为开工预付款，1为材料预付款，2位安全生产费预付款' ;

-- 接口相关
ALTER TABLE `zh_tender`
ADD COLUMN `s2b_gxby_check`  tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '工序报验-检查计量' AFTER `copy_id`,
ADD COLUMN `s2b_gxby_limit`  tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '限制上报' AFTER `s2b_gxby_check`,
ADD COLUMN `s2b_dagl_check`  tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '档案管理-检查计量' AFTER `s2b_gxby_limit`,
ADD COLUMN `s2b_dagl_limit`  tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '档案管理-限制上报' AFTER `s2b_dagl_check`;

