2016-10-14 13:13:58 -04:00
|
|
|
class AddDirectoryItemsIndexes < ActiveRecord::Migration
|
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
|