Files
Neo-ZQYY/db/etl_feiqiu/migrations/2026-03-31__relation_index_task_stats.sql
Neo 6f8f12314f feat: 累积功能变更 — 聊天集成、租户管理、小程序更新、ETL 增强、迁移脚本
包含多个会话的累积代码变更:
- backend: AI 聊天服务、触发器调度、认证增强、WebSocket、调度器最小间隔
- admin-web: ETL 状态页、任务管理、调度配置、登录优化
- miniprogram: 看板页面、聊天集成、UI 组件、导航更新
- etl: DWS 新任务(finance_area_daily/board_cache)、连接器增强
- tenant-admin: 项目初始化
- db: 19 个迁移脚本(etl_feiqiu 11 + zqyy_app 8)
- packages/shared: 枚举和工具函数更新
- tools: 数据库工具、报表生成、健康检查
- docs: PRD/架构/部署/合约文档更新

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 00:03:48 +08:00

31 lines
1.7 KiB
PL/PgSQL
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.
-- 关系指数表新增任务统计字段2026-03-31
-- C: 历史总计字段
BEGIN;
ALTER TABLE dws.dws_member_assistant_relation_index
ADD COLUMN IF NOT EXISTS recall_created_total INT NOT NULL DEFAULT 0,
ADD COLUMN IF NOT EXISTS recall_completed_total INT NOT NULL DEFAULT 0,
ADD COLUMN IF NOT EXISTS follow_up_created_total INT NOT NULL DEFAULT 0,
ADD COLUMN IF NOT EXISTS follow_up_completed_total INT NOT NULL DEFAULT 0,
ADD COLUMN IF NOT EXISTS total_created INT NOT NULL DEFAULT 0,
ADD COLUMN IF NOT EXISTS total_completed INT NOT NULL DEFAULT 0;
COMMENT ON COLUMN dws.dws_member_assistant_relation_index.recall_created_total IS '历史累计召回任务创建数';
COMMENT ON COLUMN dws.dws_member_assistant_relation_index.recall_completed_total IS '历史累计召回任务完成数';
COMMENT ON COLUMN dws.dws_member_assistant_relation_index.follow_up_created_total IS '历史累计回访任务创建数';
COMMENT ON COLUMN dws.dws_member_assistant_relation_index.follow_up_completed_total IS '历史累计回访任务完成数';
COMMENT ON COLUMN dws.dws_member_assistant_relation_index.total_created IS '历史累计任务创建总数';
COMMENT ON COLUMN dws.dws_member_assistant_relation_index.total_completed IS '历史累计任务完成总数';
COMMIT;
-- ROLLBACK:
-- ALTER TABLE dws.dws_member_assistant_relation_index
-- DROP COLUMN IF EXISTS recall_created_total,
-- DROP COLUMN IF EXISTS recall_completed_total,
-- DROP COLUMN IF EXISTS follow_up_created_total,
-- DROP COLUMN IF EXISTS follow_up_completed_total,
-- DROP COLUMN IF EXISTS total_created,
-- DROP COLUMN IF EXISTS total_completed;