feat(database): add automatic migration on startup and enhance text analysis cache source

This commit is contained in:
MythEclipse
2026-05-31 23:01:38 +07:00
parent 96cd0cfc62
commit 7607282db2
13 changed files with 178 additions and 14 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ CREATE TABLE IF NOT EXISTS text_analysis_cache (
text TEXT PRIMARY KEY,
flags TEXT NOT NULL DEFAULT '[]',
source TEXT NOT NULL DEFAULT 'local'
CHECK (source IN ('local', 'nvidia', 'primary_ai', 'groq')),
CHECK (source IN ('local', 'nvidia', 'primary_ai', 'groq', 'vision_llm')),
analyzed_at BIGINT NOT NULL,
expires_at BIGINT NOT NULL,
hit_count INTEGER NOT NULL DEFAULT 0