2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-08-31 00:06:56 -04:00
|
|
|
class AddDirectoryItemsIndexes < ActiveRecord::Migration[4.2]
|
2016-10-25 15:30:21 -04:00
|
|
|
disable_ddl_transaction!
|
|
|
|
|
2016-10-14 13:13:58 -04:00
|
|
|
def change
|
2016-10-25 15:30:21 -04:00
|
|
|
add_index :directory_items, :likes_received, algorithm: :concurrently
|
|
|
|
add_index :directory_items, :likes_given, algorithm: :concurrently
|
|
|
|
add_index :directory_items, :topics_entered, algorithm: :concurrently
|
|
|
|
add_index :directory_items, :topic_count, algorithm: :concurrently
|
|
|
|
add_index :directory_items, :post_count, algorithm: :concurrently
|
|
|
|
add_index :directory_items, :posts_read, algorithm: :concurrently
|
|
|
|
add_index :directory_items, :days_visited, algorithm: :concurrently
|
2016-10-14 13:13:58 -04:00
|
|
|
end
|
|
|
|
end
|