Index: modules/field/modules/field_sql_storage/field_sql_storage.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/modules/field_sql_storage/field_sql_storage.install,v
retrieving revision 1.12
diff -u -p -r1.12 field_sql_storage.install
--- modules/field/modules/field_sql_storage/field_sql_storage.install	21 Dec 2010 04:11:12 -0000	1.12
+++ modules/field/modules/field_sql_storage/field_sql_storage.install	21 Dec 2010 14:18:04 -0000
@@ -187,6 +187,9 @@ function field_sql_storage_update_7001(&
 
     // We're done.
     $sandbox['#finished'] = 1;
+
+    // Set a temporary marker for field_sql_storage_update_7002().
+    variable_set('field_sql_storage_update_7001_finished', 1);
   }
 }
 
@@ -194,6 +197,18 @@ function field_sql_storage_update_7001(&
  * Fix primary keys in field revision data tables.
  */
 function field_sql_storage_update_7002() {
+  // When field_sql_storage_update_7001() was introduced, sites that did not
+  // have multiple field revisions were able to complete it. However, those
+  // sites were no longer able to store new field revision data, since the
+  // primary key did not contain 'revision_id'. The primary key change in
+  // field_sql_storage_update_7001() has been corrected, so this update is only
+  // required for sites on which the original/broken 7001 update did not fail.
+  $status = variable_get('field_sql_storage_update_7001_finished', 0);
+  variable_del('field_sql_storage_update_7001_finished');
+  if ($status) {
+    return;
+  }
+
   $results = db_select('field_config', 'fc', array('fetch' => PDO::FETCH_ASSOC))
     ->fields('fc')
     ->condition('storage_module', 'field_sql_storage')
