diff --git a/migrations/003_epics_embedding.sql b/migrations/003_epics_embedding.sql new file mode 100644 index 0000000..c73589a --- /dev/null +++ b/migrations/003_epics_embedding.sql @@ -0,0 +1,12 @@ +-- Migration 003: Add embedding column to epics table +-- Enables semantic search for epics + +-- Add embedding column to epics table +ALTER TABLE epics ADD COLUMN IF NOT EXISTS embedding vector(1024); + +-- Create HNSW index for fast vector similarity search +CREATE INDEX IF NOT EXISTS idx_epics_embedding ON epics USING hnsw (embedding vector_cosine_ops); + +-- Record migration +INSERT INTO schema_migrations (version, applied_at) VALUES ('003_epics_embedding', NOW()) +ON CONFLICT DO NOTHING;