mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
PERF: added missing indexes for pinned topics
This commit is contained in:
parent
738f2cb72c
commit
8c7cce1bfc
1 changed files with 6 additions and 0 deletions
6
db/migrate/20150224004420_add_pinned_indexes.rb
Normal file
6
db/migrate/20150224004420_add_pinned_indexes.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
class AddPinnedIndexes < ActiveRecord::Migration
|
||||
def change
|
||||
add_index :topics, :pinned_globally, where: 'pinned_globally'
|
||||
add_index :topics, :pinned_at, where: 'pinned_at IS NOT NULL'
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue