Files
btrc-hub/backend/db/migrate/20250729124200_create_post_similarities.rb
2025-07-30 00:20:03 +09:00

10 lines
319 B
Ruby

class CreatePostSimilarities < ActiveRecord::Migration[7.0]
def change
create_table :post_similarities do |t|
t.references :post, null: false, foreign_key: { to_table: :posts }
t.references :target_post, null: false, foreign_key: { to_table: :posts }
t.float :cos, null: false
end
end
end