mirror of
https://github.com/discourse/discourse.git
synced 2025-06-07 11:44:46 +08:00
PERF: added missing indexes for pinned topics
This commit is contained in:
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
|
Reference in New Issue
Block a user