Files
ccdi/sql/fix_ccdi_project_table.sql
wkc 474dcab396 fix: 移除项目查询中的 del_flag 条件
- 从 CcdiProjectMapper.xml 中移除 p.del_flag = '0' 条件
- 保留 sys_user 表的 del_flag 过滤(用户逻辑删除)
- 修复前端查询错误
2026-02-27 09:00:56 +08:00

12 lines
492 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- 修复 ccdi_project 表 - 添加缺失的字段
-- 执行时间: 2026-02-27
-- 1. 添加 del_flag 字段(如果不存在)
ALTER TABLE ccdi_project ADD COLUMN IF NOT EXISTS `del_flag` CHAR(1) DEFAULT '0' COMMENT '删除标志0-存在2-删除';
-- 2. 添加 del_flag 索引(如果不存在)
CREATE INDEX IF NOT EXISTS idx_del_flag ON ccdi_project(del_flag);
-- 3. 更新所有现有记录的 del_flag 默认值
UPDATE ccdi_project SET del_flag = '0' WHERE del_flag IS NULL;