2016-10-15 01:13:58 +08:00
|
|
|
class AddDirectoryItemsIndexes < ActiveRecord::Migration
|
2016-10-26 03:30:21 +08:00
|
|
|
disable_ddl_transaction!
|
|
|
|
|
2016-10-15 01:13:58 +08:00
|
|
|
def change
|
2016-10-26 03:30:21 +08: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-15 01:13:58 +08:00
|
|
|
end
|
|
|
|
end
|