diff --git modules/system/system.install modules/system/system.install
index aa864fd..d5a5720 100644
--- modules/system/system.install
+++ modules/system/system.install
@@ -2703,7 +2703,7 @@ function system_update_7060(&$sandbox) {
     // may have had attachments disabled after files were uploaded. Look for
     // any other node types referenced by the upload records and add those to
     // the list. The admin can always remove the field later.
-    $results = db_query('SELECT DISTINCT type FROM {node} n INNER JOIN {upload} u ON n.vid = u.vid');
+    $results = db_query('SELECT DISTINCT type FROM {node} n INNER JOIN {node_revision} nr ON n.nid = nr.nid INNER JOIN {upload} u ON nr.vid = u.vid');
     foreach ($results as $row) {
       if (!isset($context['types'][$row->type])) {
         drupal_set_message(t('The content type %rowtype had uploads disabled but contained uploaded file data. Uploads have been re-enabled to migrate the existing data. You may delete the "File attachments" field in the %rowtype type if this data is not necessary.', array('%rowtype' => $row->type)));
@@ -2779,13 +2779,21 @@ function system_update_7060(&$sandbox) {
       );
 
       // Create the field. Save the field id for the data insertion later on.
-      $field = field_create_field($field);
+      $field_instance = field_info_field('file');
+      if (empty($field_instance)) {
+        $field = field_create_field($field);
+      }
+      else {
+        $field = $field_instance;
+      }
       $sandbox['field_id'] = $field['id'];
 
       // Create the instances.
       foreach ($context['types'] as $bundle) {
-        $instance['bundle'] = $bundle;
-        field_create_instance($instance);
+        if (!field_info_instance('node', 'file', $bundle)) {
+          $instance['bundle'] = $bundle;
+          field_create_instance($instance);
+        }
       }
     }
     else {
@@ -2796,9 +2804,14 @@ function system_update_7060(&$sandbox) {
     }
   }
 
+  // Determine vids for this batch.
+  // Process all files attached to a given revision during same batch.
+  $limit = 100;
+  $vids = db_query_range('SELECT DISTINCT vid FROM {upload} WHERE vid > :lastvid ORDER BY vid', 0, $limit, array(':lastvid' => $sandbox['last_vid_processed']))
+    ->fetchCol();
+
   // Migrate a batch of files from the upload table to the appropriate field.
-  $limit = 500;
-  $result = db_query_range('SELECT DISTINCT u.fid, u.vid, u.list, u.description, n.nid, n.type FROM {upload} u INNER JOIN {node_revision} nr ON u.vid = nr.vid INNER JOIN {node} n ON n.nid = nr.nid WHERE u.vid > :lastvid ORDER BY u.vid, u.weight', 0, $limit, array(':lastvid' => $sandbox['last_vid_processed']));
+  $result = db_query('SELECT u.fid, u.vid, u.list, u.description, n.nid, n.type, u.weight FROM {upload} u INNER JOIN {node_revision} nr ON u.vid = nr.vid INNER JOIN {node} n ON n.nid = nr.nid WHERE u.vid IN (:vids) ORDER BY u.vid, u.weight', array(':vids' => $vids));
   foreach ($result as $record) {
     // Note that we still reference the old files table here, since upload will
     // not know about the new FID in the new file_managed table.
@@ -2813,6 +2826,7 @@ function system_update_7060(&$sandbox) {
 
     $file['description'] = $record->description;
     $file['display'] = $record->list;
+    $file['weight'] = $record->weight;
 
     $node_revisions[$record->vid]['nid'] = $record->nid;
     $node_revisions[$record->vid]['vid'] = $record->vid;
@@ -2820,15 +2834,6 @@ function system_update_7060(&$sandbox) {
     $node_revisions[$record->vid]['file'][LANGUAGE_NONE][] = $file;
   }
 
-  // To make sure we process an entire node all at once, toss the last node
-  // revision (which might be partial) unless it's the last one.
-  if ((count($node_revisions) > 1) && ($result->rowCount() == $limit)) {
-    array_pop($node_revisions);
-  }
-  else {
-    $finished = TRUE;
-  }
-
   $basename = variable_get('file_directory_path', conf_path() . '/files');
   $scheme = file_default_scheme() . '://';
   foreach ($node_revisions as $vid => $revision) {
@@ -2866,13 +2871,20 @@ function system_update_7060(&$sandbox) {
 
     // Insert the revision's files into the field_upload table.
     $node = (object) $revision;
-    field_sql_storage_field_storage_write('node', $node, FIELD_STORAGE_INSERT, array($sandbox['field_id']));
+    field_sql_storage_field_storage_write('node', $node, FIELD_STORAGE_UPDATE, array($sandbox['field_id']));
 
     // Update our progress information for the batch update.
     $sandbox['progress']++;
     $sandbox['last_vid_processed'] = $vid;
   }
 
+  // If less than limit node revisions were processed, the update process is
+  // finished.
+  if (count($node_revisions) < $limit) {
+    $finished = TRUE;
+  }
+
+
   // If there's no max value then there's nothing to update and we're finished.
   if (empty($sandbox['max']) || isset($finished)) {
     db_drop_table('upload');
