| 1234567891011121314151617181920212223242526272829 |
- -- ============================================================================
- -- 清理已下线遗留模块的数据库表(2026-11-17)
- --
- -- 下线范围:
- -- 1) module/knowledge(旧知识库)——已由 ai_knowledge_base / ai_document 取代;
- -- 2) module/attachment(旧对话附件)——已由 ai_message_attachment / 新 AI 附件链路取代;
- -- 3) 无任何代码引用的历史表:meta_raw_file / meta_raw_sheet / rag_index_status /
- -- rag_ws78431654_d1024。
- --
- -- 说明:
- -- - 执行前请确认没有外部旧客户端仍调用 /knowledge-bases 等已删除接口;
- -- - 本脚本只删表,不清理旧文档文件与旧附件文件(已随代码清理手工删除)。
- -- ============================================================================
- drop table if exists knowledge_base cascade;
- drop table if exists knowledge_doc cascade;
- drop table if exists knowledge_doc_download_log cascade;
- drop table if exists kb_vec_1_bge_m3_d1024 cascade;
- drop table if exists kb_vec_1_d1024 cascade;
- drop table if exists kb_vec_2117247642917994497_bge_m3_d1024 cascade;
- drop table if exists kb_vec_2117254846962286594_bge_m3_d1024 cascade;
- drop table if exists chat_attachment cascade;
- drop table if exists meta_raw_file cascade;
- drop table if exists meta_raw_sheet cascade;
- drop table if exists rag_index_status cascade;
- drop table if exists rag_ws78431654_d1024 cascade;
|