Files
ruoyi-ai/script/sql/update/add_graph_build_task_fields.sql
Administrator 3610899f2b fix(billing): 新增知识图谱构
1. 从非结构化文本中自动抽取实体和关系
2. 构建和管理知识图谱
3. 基于图谱的检索增强生成(GraphRAG)
4. 交互式图谱可视化
2025-10-23 09:48:49 +08:00

36 lines
1.2 KiB
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.
-- ========================================
-- 为 graph_build_task 表添加缺失字段
-- ========================================
-- 执行日期: 2025-10-11
-- 说明: 添加 create_dept 和 update_by 字段以符合 MyBatis-Plus BaseEntity 规范
-- ========================================
-- 检查表是否存在
SELECT 'Adding fields to graph_build_task table...' AS status;
-- 添加 create_dept 字段(如果不存在)
ALTER TABLE `graph_build_task`
ADD COLUMN `create_dept` BIGINT(20) NULL COMMENT '创建部门' AFTER `end_time`;
-- 添加 update_by 字段(如果已存在 create_by 但缺少 update_by
-- 注意update_by 应该在 create_time 之前
ALTER TABLE `graph_build_task`
ADD COLUMN `update_by` VARCHAR(64) DEFAULT '' COMMENT '更新者' AFTER `create_by`;
-- 验证字段是否添加成功
SELECT 'Fields added successfully!' AS status;
-- 查看表结构
DESCRIBE `graph_build_task`;
-- ========================================
-- 说明
-- ========================================
-- create_dept: 创建部门ID与创建者关联
-- update_by: 更新者用户名或ID
--
-- 这两个字段是 MyBatis-Plus BaseEntity 的标准字段
-- 添加后可以正常使用自动填充功能
-- ========================================