docbrown/db/migrate/20190412093614_add_comment_indexes.rb
2019-04-12 06:18:06 -04:00

6 lines
173 B
Ruby

class AddCommentIndexes < ActiveRecord::Migration[5.2]
def change
add_index :comments, %i[commentable_id commentable_type]
add_index :comments, :user_id
end
end