class ActiveRecord::Migration

def reverting?

def reverting?
  connection.respond_to?(:reverting) && connection.reverting
end