lib/active_migration/base.rb
def run
      logger.info("#{self.class.to_s} is starting.")
      count_options = self.class.legacy_find_options.dup
      count_options.delete(:order)
      count_options.delete(:group)
      count_options.delete(:limit)
      count_options.delete(:offset)
      @num_of_records = self.class.legacy_model.count(count_options)
      if self.class.legacy_find_options[:limit] && (@num_of_records > self.class.legacy_find_options[:limit])
        run_in_batches @num_of_records
      else
        run_normal
      end
      logger.info("#{self.class.to_s} migrated all #{@num_of_records} records successfully.")
    end
def run
      logger.info("#{self.class.to_s} is starting.")
      count_options = self.class.legacy_find_options.dup
      count_options.delete(:order)
      count_options.delete(:group)
      count_options.delete(:limit)
      count_options.delete(:offset)
      @num_of_records = self.class.legacy_model.count(count_options)
      if self.class.legacy_find_options[:limit] && (@num_of_records > self.class.legacy_find_options[:limit])
        run_in_batches @num_of_records
      else
        run_normal
      end
      logger.info("#{self.class.to_s} migrated all #{@num_of_records} records successfully.")
    end
Runs the migration.

   MyMigration.new.run