fix: remove remnant job table, normalize taskstatus enum

This commit is contained in:
Per Stark
2025-06-27 23:18:16 +02:00
parent 43263fa77e
commit ec16f2100c
9 changed files with 33 additions and 22 deletions

View File

@@ -7,7 +7,7 @@ use axum_htmx::{HxBoosted, HxRequest};
use serde::{Deserialize, Serialize};
use common::storage::types::{
conversation::Conversation, file_info::FileInfo, text_content::TextContent, user::User,
conversation::Conversation, file_info::FileInfo, text_content::TextContent, user::User, knowledge_entity::KnowledgeEntity, text_chunk::TextChunk,
};
use crate::{
@@ -138,6 +138,10 @@ pub async fn delete_text_content(
FileInfo::delete_by_id(&file_info.id, &state.db).await?;
}
// Delete related knowledge entities and text chunks
KnowledgeEntity::delete_by_source_id(&id, &state.db).await?;
TextChunk::delete_by_source_id(&id, &state.db).await?;
// Delete the text content
state.db.delete_item::<TextContent>(&id).await?;