2023-07-27 14:50:03 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class CreateMultilingualTopicEmbeddingsTable < ActiveRecord::Migration[7.0]
|
|
|
|
def change
|
2023-10-16 17:50:37 -04:00
|
|
|
create_table :ai_topic_embeddings_3_1, id: false do |t|
|
2023-09-05 13:31:04 -04:00
|
|
|
t.integer :topic_id, null: false
|
|
|
|
t.integer :model_version, null: false
|
|
|
|
t.integer :strategy_version, null: false
|
|
|
|
t.text :digest, null: false
|
2023-10-16 17:50:37 -04:00
|
|
|
t.column :embeddings, "vector(1024)", null: false
|
2023-09-05 13:31:04 -04:00
|
|
|
t.timestamps
|
2023-07-27 14:50:03 -04:00
|
|
|
|
2023-09-05 13:31:04 -04:00
|
|
|
t.index :topic_id, unique: true
|
2023-07-27 14:50:03 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|