1 class RecentTopicsIndex < ActiveRecord::Migration
3 # this index needed for when we get recent posts only and bypass the sticky bit
4 # in that case the databaes would be unable to use the existing index
5 add_index :topics, [:forum_id, :replied_at]
9 remove_index :topics, [:forum_id, :replied_at]