chore: checkpoint ai search comments and i18n foundation

This commit is contained in:
2026-03-28 17:17:31 +08:00
parent d18a709987
commit ec96d91548
71 changed files with 9494 additions and 423 deletions

View File

@@ -0,0 +1,33 @@
use loco_rs::schema::*;
use sea_orm_migration::prelude::*;
#[derive(DeriveMigrationName)]
pub struct Migration;
#[async_trait::async_trait]
impl MigrationTrait for Migration {
async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> {
create_table(
manager,
"ai_chunks",
&[
("id", ColType::PkAuto),
("source_slug", ColType::String),
("source_title", ColType::StringNull),
("source_path", ColType::StringNull),
("source_type", ColType::String),
("chunk_index", ColType::Integer),
("content", ColType::Text),
("content_preview", ColType::StringNull),
("embedding", ColType::JsonBinaryNull),
("word_count", ColType::IntegerNull),
],
&[],
)
.await
}
async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> {
drop_table(manager, "ai_chunks").await
}
}