feat(storage): integrate Alibaba Cloud OSS for file persistence - Add OSSAdapter and LocalAdapter with StorageFactory pattern - Integrate PKB module with OSS upload - Rename difyDocumentId to storageKey - Create 4 OSS buckets and development specification
This commit is contained in:
@@ -116,6 +116,9 @@ ORDER BY ordinal_position;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -129,6 +129,9 @@ runMigration()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -63,6 +63,9 @@ COMMENT ON COLUMN "dc_schema"."dc_tool_c_sessions"."column_mapping" IS '列名
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -90,6 +90,9 @@ COMMENT ON COLUMN dc_schema.dc_tool_c_sessions.expires_at IS '过期时间(创
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -62,3 +62,6 @@ USING gin (metadata jsonb_path_ops);
|
||||
-- SELECT indexname, indexdef FROM pg_indexes WHERE schemaname = 'ekb_schema';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -29,3 +29,6 @@ ON "ekb_schema"."ekb_document"
|
||||
USING gin (tags);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ model Document {
|
||||
fileType String @map("file_type")
|
||||
fileSizeBytes BigInt @map("file_size_bytes")
|
||||
fileUrl String @map("file_url")
|
||||
difyDocumentId String @map("dify_document_id")
|
||||
storageKey String @map("dify_document_id") // 原 difyDocumentId,现存储 OSS 路径
|
||||
status String @default("uploading")
|
||||
progress Int @default(0)
|
||||
errorMessage String? @map("error_message")
|
||||
@@ -168,7 +168,7 @@ model Document {
|
||||
batchResults BatchResult[] @relation("DocumentBatchResults")
|
||||
knowledgeBase KnowledgeBase @relation("KnowledgeBaseDocuments", fields: [kbId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([difyDocumentId], map: "idx_pkb_documents_dify_document_id")
|
||||
@@index([storageKey], map: "idx_pkb_documents_dify_document_id") // 保留原索引名
|
||||
@@index([extractionMethod], map: "idx_pkb_documents_extraction_method")
|
||||
@@index([kbId], map: "idx_pkb_documents_kb_id")
|
||||
@@index([status], map: "idx_pkb_documents_status")
|
||||
|
||||
Reference in New Issue
Block a user