2019-05-03 06:17:27 +08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-08-31 12:06:56 +08:00
|
|
|
class AddDirectoryItemsIndexes < ActiveRecord::Migration[4.2]
|
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
|