Files
qihuaiflow/migrations/015_production_fixes.sql
T
qyyfw 78ff261b5a 初始提交: Qihu-AIFlow v2.0.1 完整项目
- 前端 React+TypeScript (源码+构建产物)
- 后端 Python FastAPI
- 数据库迁移 001-015
- Docker部署配置
- 微信ClawBot API频道绑定
- 项目文档 README.md
2026-07-02 14:40:46 +08:00

12 lines
634 B
SQL

-- ============================================================
-- 015: 生产环境缺陷修复
-- ============================================================
-- 问题2修复: knowledge_documents 表添加 content 列
SET @col_exists = (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'aiflow' AND TABLE_NAME = 'knowledge_documents' AND COLUMN_NAME = 'content');
SET @sql = IF(@col_exists = 0, 'ALTER TABLE knowledge_documents ADD COLUMN content LONGTEXT DEFAULT NULL AFTER error_message', 'SELECT ''content column already exists'' AS msg');
PREPARE stmt FROM @sql;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;