2017-08-31 12:06:56 +08:00
|
|
|
class AddPinnedIndexes < ActiveRecord::Migration[4.2]
|
2015-02-24 08:53:32 +08:00
|
|
|
def change
|
|
|
|
add_index :topics, :pinned_globally, where: 'pinned_globally'
|
|
|
|
add_index :topics, :pinned_at, where: 'pinned_at IS NOT NULL'
|
|
|
|
end
|
|
|
|
end
|