diff --git a/db/migrate/20241230153300_new_embeddings_tables.rb b/db/migrate/20241230153300_new_embeddings_tables.rb index 59ee5e69..34e6ca91 100644 --- a/db/migrate/20241230153300_new_embeddings_tables.rb +++ b/db/migrate/20241230153300_new_embeddings_tables.rb @@ -67,13 +67,17 @@ class NewEmbeddingsTables < ActiveRecord::Migration[7.2] end # Copy data from old tables to new tables - execute <<-SQL + execute <<~SQL INSERT INTO ai_topics_embeddings (topic_id, model_id, model_version, strategy_id, strategy_version, digest, embeddings, created_at, updated_at) SELECT * FROM ai_topic_embeddings; + SQL + execute <<~SQL INSERT INTO ai_posts_embeddings (post_id, model_id, model_version, strategy_id, strategy_version, digest, embeddings, created_at, updated_at) SELECT * FROM ai_post_embeddings; + SQL + execute <<~SQL INSERT INTO ai_document_fragments_embeddings (rag_document_fragment_id, model_id, model_version, strategy_id, strategy_version, digest, embeddings, created_at, updated_at) SELECT * FROM ai_document_fragment_embeddings; SQL