mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
PERF: add index to make finding new topics faster
This commit is contained in:
parent
669247f16f
commit
20bee937b7
1 changed files with 6 additions and 0 deletions
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…
Reference in a new issue