20140724180943_add_index_to_blog_posts_sort.rb 325 Bytes
class AddIndexToBlogPostsSort < ActiveRecord::Migration
  def self.up
     %w[articles article_versions].each do |table|
      add_index table.to_sym, [:published_at, :id]
    end
 end

  def self.down
     %w[articles article_versions].each do |table|
      remove_index table.to_sym, [:published_at, :id]
    end
  end
end