Retrospring/db/migrate/20200509094402_add_some_ind...

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
388 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class AddSomeIndexes < ActiveRecord::Migration[5.2]
def change
add_index :answers, :question_id
add_index :comments, :answer_id
add_index :inboxes, :user_id
add_index :reports, %i[type target_id]
add_index :reports, %i[user_id created_at]
add_index :services, :user_id
add_index :subscriptions, %i[user_id answer_id]
end
end