- migrate-project-docs-batch.mjs: 60 files across 23 projects - migrate-cf-docs-batch.mjs: ClaudeFramework documentation - migrate-plans-batch.mjs: Session plan files - 017_fix_archives_embedding_dimension.sql: Fix vector dimension - run-migration.js: Node.js migration runner utility Total migrated: 332 files, 8.85MB with semantic embeddings Fixes: CF-277
18 lines
610 B
SQL
18 lines
610 B
SQL
-- Migration 017: Fix project_archives embedding dimension
|
|
-- Changes vector(1536) to vector(1024) to match mxbai-embed-large model
|
|
|
|
-- Drop existing index first
|
|
DROP INDEX IF EXISTS idx_archives_embedding;
|
|
|
|
-- Alter the embedding column dimension
|
|
ALTER TABLE project_archives
|
|
ALTER COLUMN embedding TYPE vector(1024);
|
|
|
|
-- Recreate index with correct dimension
|
|
CREATE INDEX idx_archives_embedding ON project_archives
|
|
USING hnsw (embedding vector_cosine_ops);
|
|
|
|
-- Record migration
|
|
INSERT INTO schema_migrations (version) VALUES ('017_fix_archives_embedding_dimension')
|
|
ON CONFLICT (version) DO NOTHING;
|