mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 06:29:30 +08:00
PERF: added missing indexes for pinned topics
This commit is contained in:
parent
738f2cb72c
commit
8c7cce1bfc
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 New Issue
Block a user