class AddIndexToPostSimilarities < ActiveRecord::Migration[8.0]
  def change
    remove_index :post_similarities, name: 'index_post_similarities_on_post_id'

    add_index :post_similarities, [:post_id, :cos],
              order: { cos: :desc },
              name: 'index_post_similarities_on_post_id_and_cos'
  end
end
