From 605955fdaffebfe6d3505e6a493f9f52b2f1d754 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Mon, 3 Nov 2025 17:29:25 -0500 Subject: [PATCH] Make old migration that depends on the sqlite vec0 module a no-op Once the sqlite 'vec0' module was removed from the codebase in 38a7a144 (following the table removal in 875a298f), this migration became unrunnable. So to make sure we can reconstruct the schema if necessary by running all the migrations, I'm replacing it with the creation of an empty table. --- .../20250723165724_create_search_embeddings.rb | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/db/migrate/20250723165724_create_search_embeddings.rb b/db/migrate/20250723165724_create_search_embeddings.rb index 688d4a082..ad91e507e 100644 --- a/db/migrate/20250723165724_create_search_embeddings.rb +++ b/db/migrate/20250723165724_create_search_embeddings.rb @@ -1,10 +1,16 @@ class CreateSearchEmbeddings < ActiveRecord::Migration[7.1] def change - create_virtual_table :search_embeddings, :vec0, [ - "id INTEGER PRIMARY KEY", - "record_type TEXT NOT NULL", - "record_id INTEGER NOT NULL", - "embedding FLOAT[1536] distance_metric=cosine" - ] + # create_virtual_table :search_embeddings, :vec0, [ + # "id INTEGER PRIMARY KEY", + # "record_type TEXT NOT NULL", + # "record_id INTEGER NOT NULL", + # "embedding FLOAT[1536] distance_metric=cosine" + # ] + + # Above is the original migration. Once the sqlite 'vec0' module was removed from the codebase + # in 38a7a144 (following the table removal in 875a298f), this migration became unrunnable. So to + # make sure we can reconstruct the schema if necessary by running all the migrations, I'm + # replacing it with this empty table. + create_table :search_embeddings end end