Skip to content

Commit 507cc36

Browse files
committed
docs(knowledge): clarify soft-delete table retention rationale
1 parent 2cdb519 commit 507cc36

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

apps/sim/app/api/knowledge/[id]/route.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,11 @@ export async function DELETE(
203203
}
204204

205205
await deleteKnowledgeBase(id, requestId)
206+
// Note: per-KB embedding tables (kb_embeddings_{id}) are intentionally NOT dropped here.
207+
// deleteKnowledgeBase performs a soft delete — the KB can be restored via the restore endpoint,
208+
// which requires the per-KB table to still exist. This is consistent with how OpenAI embeddings
209+
// remain in the shared table after a KB soft delete. Per-KB table cleanup should occur
210+
// as part of a permanent purge/hard-delete operation.
206211

207212
try {
208213
PlatformEvents.knowledgeBaseDeleted({

0 commit comments

Comments
 (0)