mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 14:07:30 +08:00
PERF: add index to make finding new topics faster
This commit is contained in:
6
db/migrate/20150301224250_create_suggested_for_index.rb
Normal file
6
db/migrate/20150301224250_create_suggested_for_index.rb
Normal file
@ -0,0 +1,6 @@
|
||||
class CreateSuggestedForIndex < ActiveRecord::Migration
|
||||
def change
|
||||
add_index :topics, [:created_at, :visible],
|
||||
where: "deleted_at IS NULL AND archetype <> 'private_message'"
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user