-- 请按如下分类提交sql！！！
-- Version V3.5.48.0401
-- uat 2025-4-1
-- prod 2025-4-4

------------------------------------
-- 表结构
------------------------------------

ALTER TABLE `zh_sub_project_permission`
ADD COLUMN `tp_cache` json NULL COMMENT '金额概况缓存' AFTER `payment_permission`,
ADD COLUMN `tp_cache_time` timestamp NULL COMMENT '缓存时间' AFTER `tp_cache`;

ALTER TABLE `zh_contract_audit`
ADD COLUMN `permission_att` tinyint(1) NULL DEFAULT 0 COMMENT '上传附件' AFTER `permission_show_node`;

ALTER TABLE `zh_material`
ADD COLUMN `calc_stage` varchar(255) NULL DEFAULT '' COMMENT '用于生成期工料含量数据，期创建后使用' AFTER `final_auditor_str`,
ADD COLUMN `calc_tp` tinyint(1) NULL DEFAULT 1 COMMENT '用于判断是否已计算总金额，期创建后使用' AFTER `calc_stage`;

------------------------------------
-- 表数据
------------------------------------
update `zh_material` set `calc_stage` = `stage_id` where `calc_stage` = '';
