mirror of
https://github.com/discourse/discourse.git
synced 2024-12-21 11:13:44 +08:00
30990006a9
This reduces chances of errors where consumers of strings mutate inputs and reduces memory usage of the app. Test suite passes now, but there may be some stuff left, so we will run a few sites on a branch prior to merging
16 lines
646 B
Ruby
16 lines
646 B
Ruby
# frozen_string_literal: true
|
|
|
|
class AddDirectoryItemsIndexes < ActiveRecord::Migration[4.2]
|
|
disable_ddl_transaction!
|
|
|
|
def change
|
|
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
|
|
end
|
|
end
|