mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-06-26 01:22:20 +00:00
FIX: Split statements to avoid timeout (#1062)
This commit is contained in:
parent
c029bc8979
commit
09ca123757
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user