SPB Git forge

spb/polyllm

Public
15commits 1branches 0releases
2.2 MBsize
maindefault branch
13 days agolast push
TypeScript 97.4% SQL 1% JavaScript 0.9% CSS 0.6%
748 B · 9 lines sql
Raw Blame History
1-- Full-text search indexes (workstream G). Expression indexes cannot be declared on tables owned by2-- another schema file, so this migration is hand-written. The expressions MUST match the ones used in3-- src/lib/search/service.ts (`msgTsv` / `titleTsv`) for the planner to pick them up.4CREATE INDEX IF NOT EXISTS "messages_content_fts_idx" ON "messages" USING gin (to_tsvector('simple', coalesce("content", '')));5--> statement-breakpoint6CREATE INDEX IF NOT EXISTS "conversations_title_fts_idx" ON "conversations" USING gin (to_tsvector('simple', coalesce("title", '')));7--> statement-breakpoint8CREATE INDEX IF NOT EXISTS "shared_conversations_user_active_idx" ON "shared_conversations" ("user_id", "created_at") WHERE "revoked_at" IS NULL;9