Files
ccdi/docs/design/2026-03-04-add-lsfx-project-id.sql
2026-03-04 09:47:42 +08:00

31 lines
838 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 表新增流水分析平台项目ID字段
-- 日期2026-03-04
-- 作者Claude Code
-- 说明为支持创建项目时集成流水分析平台需要新增字段存储流水分析平台返回的projectId
-- ====================================
USE ccdi;
-- 新增字段
ALTER TABLE `ccdi_project`
ADD COLUMN `lsfx_project_id` INT(11) DEFAULT NULL COMMENT '流水分析平台项目ID'
AFTER `low_risk_count`;
-- 验证字段是否添加成功
SELECT
COLUMN_NAME,
COLUMN_TYPE,
IS_NULLABLE,
COLUMN_DEFAULT,
COLUMN_COMMENT
FROM
INFORMATION_SCHEMA.COLUMNS
WHERE
TABLE_SCHEMA = 'ccdi'
AND TABLE_NAME = 'ccdi_project'
AND COLUMN_NAME = 'lsfx_project_id';
-- 提示信息
SELECT '字段 lsfx_project_id 添加成功!' AS message;