mirror of
https://github.com/discourse/discourse.git
synced 2025-02-21 11:25:24 +00:00
PERF: add index to make finding new topics faster
This commit is contained in:
parent
669247f16f
commit
20bee937b7
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
|
Loading…
x
Reference in New Issue
Block a user