beast rev 2066
[beast-modified.git] / db / migrate / 049_recent_topics_index.rb
blob2e1ec5cb5603e80667f8b47735a592a014cbe28c
1 class RecentTopicsIndex < ActiveRecord::Migration
2   def self.up
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]
6   end
8   def self.down
9     remove_index :topics, [:forum_id, :replied_at]
10   end
11 end