Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions db/migrate/20241025135522_alter_ai_ids_to_bigint.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

class AlterAiIdsToBigint < ActiveRecord::Migration[7.1]
def up
change_column :ai_document_fragment_embeddings, :rag_document_fragment_id, :bigint
change_column :classification_results, :target_id, :bigint
change_column :rag_document_fragments, :target_id, :bigint
end

def down
raise ActiveRecord::IrreversibleMigration
end
end
12 changes: 1 addition & 11 deletions spec/plugin_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,4 @@ def assign_fake_provider_to(setting_name)
end
end

RSpec.configure do |config|
config.include DiscourseAi::ChatBotHelper

config.before(:suite) do
if defined?(migrate_column_to_bigint)
migrate_column_to_bigint(RagDocumentFragment, :target_id)
migrate_column_to_bigint("ai_document_fragment_embeddings", "rag_document_fragment_id")
migrate_column_to_bigint(ClassificationResult, :target_id)
end
end
end
RSpec.configure { |config| config.include DiscourseAi::ChatBotHelper }