feat: add vector_store_id column to knowledge_bases for per-KB vector store binding

This commit is contained in:
ochan.kwon
2026-04-20 11:18:51 +09:00
committed by lyingbug
parent e3b493e316
commit 127654ee78
6 changed files with 400 additions and 1 deletions
+3
View File
@@ -67,12 +67,15 @@ CREATE TABLE IF NOT EXISTS knowledge_bases (
is_pinned INTEGER NOT NULL DEFAULT 0,
pinned_at DATETIME NULL,
asr_config TEXT,
vector_store_id VARCHAR(36),
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,
deleted_at DATETIME
);
CREATE INDEX IF NOT EXISTS idx_knowledge_bases_tenant_id ON knowledge_bases(tenant_id);
CREATE INDEX IF NOT EXISTS idx_knowledge_bases_tenant_vector_store
ON knowledge_bases(tenant_id, vector_store_id);
CREATE TABLE IF NOT EXISTS knowledges (
id VARCHAR(36) PRIMARY KEY,