Index: includes/database/schema.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database/schema.inc,v
retrieving revision 1.32
diff -u -p -r1.32 schema.inc
--- includes/database/schema.inc	21 Mar 2010 20:49:01 -0000	1.32
+++ includes/database/schema.inc	23 Mar 2010 07:40:46 -0000
@@ -554,12 +554,14 @@ abstract class DatabaseSchema implements
    *   If the specified table already exists.
    */
   public function createTable($name, $table) {
-    if ($this->tableExists($name)) {
-      throw new DatabaseSchemaObjectExistsException(t('Table %name already exists.', array('%name' => $name)));
+    try {
+      $statements = $this->createTableSql($name, $table);
+      foreach ($statements as $statement) {
+        $this->connection->query($statement);
+      }
     }
-  	$statements = $this->createTableSql($name, $table);
-    foreach ($statements as $statement) {
-    	$this->connection->query($statement);
+    catch (PDOException $e) {
+      throw $e;
     }
   }
 
Index: modules/aggregator/aggregator.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.test,v
retrieving revision 1.38
diff -u -p -r1.38 aggregator.test
--- modules/aggregator/aggregator.test	26 Feb 2010 00:11:58 -0000	1.38
+++ modules/aggregator/aggregator.test	23 Mar 2010 07:40:47 -0000
@@ -283,6 +283,8 @@ class AddFeedTestCase extends Aggregator
     $this->drupalGet('aggregator/sources/' . $feed->fid);
     $this->assertResponse(200, t('Feed source exists.'));
     $this->assertText($feed->title, t('Page title'));
+    $this->drupalGet('aggregator/sources/' . $feed->fid . '/categorize');
+    $this->assertResponse(200, t('Feed categorization page exists.'));
 
     // Delete feed.
     $this->deleteFeed($feed);
@@ -486,6 +488,7 @@ class CategorizeFeedItemTestCase extends
     $menu_link = db_query("SELECT * FROM {menu_links} WHERE link_path = :link_path", array(':link_path' => $link_path))->fetch();
     $this->assertTrue(!empty($menu_link), t('The menu link associated with the category found in database.'));
 
+
     $feed = $this->createFeed();
     db_insert('aggregator_category_feed')
       ->fields(array(
Index: modules/block/block.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/block/block.install,v
retrieving revision 1.39
diff -u -p -r1.39 block.install
--- modules/block/block.install	4 Mar 2010 21:42:00 -0000	1.39
+++ modules/block/block.install	23 Mar 2010 07:40:47 -0000
@@ -216,238 +216,3 @@ function block_install() {
     ->execute();
 }
 
-/**
- * Set system.weight to a low value for block module.
- *
- * Block should go first so that other modules can alter its output
- * during hook_page_alter(). Almost everything on the page is a block,
- * so before block module runs, there will not be much to alter.
- */
-function block_update_7000() {
-  db_update('system')
-    ->fields(array('weight' => '-5'))
-    ->condition('name', 'block')
-    ->execute();
-}
-
-
-/**
- * Add the block_node_type table.
- */
-function block_update_7001() {
-  $schema['block_node_type'] = array(
-    'description' => 'Sets up display criteria for blocks based on content types',
-    'fields' => array(
-      'module' => array(
-        'type' => 'varchar',
-        'length' => 64,
-        'not null' => TRUE,
-        'description' => "The block's origin module, from {block}.module.",
-      ),
-      'delta' => array(
-        'type' => 'varchar',
-        'length' => 32,
-        'not null' => TRUE,
-        'description' => "The block's unique delta within module, from {block}.delta.",
-      ),
-      'type' => array(
-        'type' => 'varchar',
-        'length' => 32,
-        'not null' => TRUE,
-        'description' => "The machine-readable name of this type from {node_type}.type.",
-      ),
-    ),
-    'primary key' => array('module', 'delta', 'type'),
-    'indexes' => array(
-      'type' => array('type'),
-    ),
-  );
-
-  db_create_table('block_node_type', $schema['block_node_type']);
-}
-
-/**
- * Rename {blocks} table to {block}, {blocks_roles} to {block_role} and
- * {boxes} to {block_custom}.
- */
-function block_update_7002() {
-  db_rename_table('blocks', 'block');
-  db_rename_table('blocks_roles', 'block_role');
-  db_rename_table('boxes', 'block_custom');
-}
-
-/**
- * Change the weight column to normal int.
- */
-function block_update_7003() {
-  db_drop_index('block', 'list');
-  db_change_field('block', 'weight', 'weight', array(
-    'type' => 'int',
-    'not null' => TRUE,
-    'default' => 0,
-    'description' => 'Block weight within region.',
-  ), array(
-    'indexes' => array(
-      'list' => array('theme', 'status', 'region', 'weight', 'module'),
-    ),
-  ));
-}
-
-/**
- * Add new blocks to new regions, migrate custom variables to blocks.
- */
-function block_update_7004() {
-  // Collect a list of themes with blocks.
-  $themes_with_blocks = array();
-  $result = db_query("SELECT s.name FROM {system} s INNER JOIN {block} b ON s.name = b.theme WHERE s.type = 'theme' GROUP by s.name");
-
-  $insert = db_insert('block')->fields(array('module', 'delta', 'theme', 'status', 'weight', 'region', 'pages', 'cache'));
-  foreach ($result as $theme) {
-    $themes_with_blocks[] = $theme->name;
-    // Add new system generated help block.
-    $insert->values(array(
-      'module' => 'system',
-      'delta' => 'help',
-      'theme' => $theme->name,
-      'status' => 1,
-      'weight' => 0,
-      'region' => 'help',
-      'pages' => '',
-      'cache' => 1,
-    ));
-    // Add new system generated main page content block.
-    $insert->values(array(
-      'module' => 'system',
-      'delta' => 'main',
-      'theme' => $theme->name,
-      'status' => 1,
-      'weight' => 0,
-      'region' => 'content',
-      'pages' => '',
-      'cache' => -1,
-    ));
-  }
-  $insert->execute();
-
-  // Migrate blocks from left/right regions to first/second regions.
-  db_update('block')
-    ->fields(array('region' => 'sidebar_first'))
-    ->condition('region', 'left')
-    ->execute();
-  db_update('block')
-    ->fields(array('region' => 'sidebar_second'))
-    ->condition('region', 'right')
-    ->execute();
-
-  // Migrate contact form information.
-  $default_format = variable_get('filter_default_format', 1);
-  if ($contact_help = variable_get('contact_form_information', '')) {
-    $bid = db_insert('block_custom')
-      ->fields(array(
-        'body' => $contact_help,
-        'info' => 'Contact page help',
-        'format' => $default_format,
-      ))
-      ->execute();
-
-    $insert = db_insert('block')->fields(array('module', 'delta', 'theme', 'status', 'weight', 'region', 'visibility', 'pages', 'cache'));
-    foreach ($themes_with_blocks as $theme) {
-      // Add contact help block for themes, which had blocks.
-      $insert->values(array(
-        'module' => 'block',
-        'delta' => $bid,
-        'theme' => $theme,
-        'status' => 1,
-        'weight' => 5,
-        'region' => 'help',
-        'visibility' => 1,
-        'pages' => 'contact',
-        'cache' => -1,
-      ));
-    }
-    drupal_set_message('The contact form information setting was migrated to <a href="' . url('admin/structure/block/manage/block/' . $bid . '/configure') . '">a custom block</a> and set up to only show on the site-wide contact page. The block was set to use the default text format, which might differ from the HTML based format used before. Check the block and ensure that the output is right.');
-  }
-  $insert->execute();
-
-  // Migrate user help setting.
-  if ($user_help = variable_get('user_registration_help', '')) {
-    $bid = db_insert('block_custom')->fields(array('body' => $user_help, 'info' => 'User registration guidelines', 'format' => $default_format))->execute();
-
-    $insert = db_insert('block')->fields(array('module', 'delta', 'theme', 'status', 'weight', 'region', 'visibility', 'pages', 'cache'));
-    foreach ($themes_with_blocks as $theme) {
-      // Add user registration help block for themes, which had blocks.
-      $insert->values(array(
-        'module' => 'block',
-        'delta' => $bid,
-        'theme' => $theme,
-        'status' => 1,
-        'weight' => 5,
-        'region' => 'help',
-        'visibility' => 1,
-        'pages' => 'user/register',
-        'cache' => -1,
-      ));
-    }
-    drupal_set_message('The user registration guidelines were migrated to <a href="' . url('admin/structure/block/manage/block/' . $bid . '/configure') . '">a custom block</a> and set up to only show on the user registration page. The block was set to use the default text format, which might differ from the HTML based format used before. Check the block and ensure that the output is right.');
-    $insert->execute();
-  }
-
-  // Migrate site mission setting.
-  if ($mission = variable_get('site_mission')) {
-    $bid = db_insert('block_custom')->fields(array('body' => $mission, 'info' => 'Site mission', 'format' => $default_format))->execute();
-
-    $insert = db_insert('block')->fields(array('module', 'delta', 'theme', 'status', 'weight', 'region', 'visibility', 'pages', 'cache'));
-    foreach ($themes_with_blocks as $theme) {
-      // Add mission block for themes, which had blocks.
-      $insert->values(array(
-        'module' => 'block',
-        'delta' => $bid,
-        'theme' => $theme,
-        'status' => 1,
-        'weight' => 0,
-        'region' => 'highlight',
-        'visibility' => 1,
-        'pages' => '<front>',
-        'cache' => -1,
-      ));
-    }
-    drupal_set_message('The site mission was migrated to <a href="' . url('admin/structure/block/manage/block/' . $bid . '/configure') . '">a custom block</a> and set up to only show on the front page in the highlighted content region. The block was set to use the default text format, which might differ from the HTML based format used before. Check the block and ensure that the output is right. If your theme does not have a highlighted content region, you might need to <a href="' . url('admin/structure/block') . '">relocate the block</a>.');
-    $insert->execute();
-    // Migrate mission to RSS site description.
-    variable_set('feed_description', $mission);
-  }
-
-  // Migrate site footer message to a custom block.
-  if ($footer_message = variable_get('site_footer', '')) {
-    $bid = db_insert('block_custom')->fields(array('body' => $footer_message, 'info' => 'Footer message', 'format' => $default_format))->execute();
-
-    $insert = db_insert('block')->fields(array('module', 'delta', 'theme', 'status', 'weight', 'region', 'pages', 'cache'));
-    foreach ($themes_with_blocks as $theme) {
-      // Add site footer block for themes, which had blocks.
-      // Set low weight, so the block comes early (it used to be
-      // before the other blocks).
-      $insert->values(array(
-        'module' => 'block',
-        'delta' => $bid,
-        'theme' => $theme,
-        'status' => 1,
-        'weight' => -10,
-        'region' => 'footer',
-        'pages' => '',
-        'cache' => -1,
-      ));
-    }
-    drupal_set_message('The footer message was migrated to <a href="' . url('admin/structure/block/manage/block/' . $bid . '/configure') . '">a custom block</a> and set up to appear in the footer. The block was set to use the default text format, which might differ from the HTML based format used before. Check the block and ensure that the output is right. If your theme does not have a footer region, you might need to <a href="' . url('admin/structure/block') . '">relocate the block</a>.');
-    $insert->execute();
-  }
-
-  // Remove the variables (even if they were saved empty on the admin interface),
-  // to avoid keeping clutter in the variables table.
-  variable_del('contact_form_information');
-  variable_del('user_registration_help');
-  variable_del('site_mission');
-  variable_del('site_footer');
-
-  // Rebuild theme data, so the new 'help' region is identified.
-  system_rebuild_theme_data();
-}
Index: modules/contact/contact.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/contact/contact.install,v
retrieving revision 1.23
diff -u -p -r1.23 contact.install
--- modules/contact/contact.install	30 Jan 2010 00:08:34 -0000	1.23
+++ modules/contact/contact.install	23 Mar 2010 07:40:47 -0000
@@ -89,54 +89,3 @@ function contact_uninstall() {
   variable_del('contact_threshold_window');
 }
 
-/**
- * @defgroup updates-6.x-to-7.x Contact updates from 6.x to 7.x
- * @{
- */
-
-/**
- * Rename the threshold limit variable.
- */
-function contact_update_7000() {
-  variable_set('contact_threshold_limit', variable_get('contact_hourly_threshold', 5));
-  variable_del('contact_hourly_threshold');
-}
-
-/**
- * Rename the administer contact forms permission.
- */
-function contact_update_7001() {
-  db_update('role_permission')
-    ->fields(array('permission' => 'administer contact forms'))
-    ->condition('permission', 'administer site-wide contact form')
-    ->execute();
-}
-
-/**
- * Enable the 'access user contact forms' for registered users by default.
- */
-function contact_update_7002() {
-  user_role_grant_permissions(DRUPAL_AUTHENTICATED_RID, array('access user contact forms'));
-}
-
-/**
- * Change the weight column to normal int.
- */
-function contact_update_7003() {
-  db_drop_index('contact', 'list');
-  db_change_field('contact', 'weight', 'weight', array(
-    'type' => 'int',
-    'not null' => TRUE,
-    'default' => 0,
-    'description' => "The category's weight.",
-  ), array(
-    'indexes' => array(
-      'list' => array('weight', 'category'),
-    ),
-  ));
-}
-
-/**
- * @} End of "defgroup updates-6.x-to-7.x"
- * The next series of updates should start at 8000.
- */
Index: modules/dblog/dblog.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/dblog/dblog.install,v
retrieving revision 1.20
diff -u -p -r1.20 dblog.install
--- modules/dblog/dblog.install	4 Dec 2009 16:49:46 -0000	1.20
+++ modules/dblog/dblog.install	23 Mar 2010 07:40:47 -0000
@@ -92,51 +92,3 @@ function dblog_schema() {
   return $schema;
 }
 
-/**
- * @defgroup updates-6.x-extra Extra database logging updates for 6.x
- * @{
- */
-
-/**
- * Allow longer referrers.
- */
-function dblog_update_6000() {
-  db_change_field('watchdog', 'referer', 'referer', array('type' => 'text', 'not null' => FALSE));
-}
-
-/**
- * @} End of "defgroup updates-6.x-extra"
- * The next series of updates should start at 7000.
- */
-
-
-/**
- * @defgroup updates-6.x-to-7.x database logging updates from 6.x to 7.x
- * @{
- */
-
-/**
- * Allow NULL values for links.
- */
-function dblog_update_7001() {
-  db_change_field('watchdog', 'link', 'link', array('type' => 'varchar', 'length' => 255, 'not null' => FALSE, 'default' => ''));
-}
-
-/**
- * Add index on uid.
- */
-function dblog_update_7002() {
-  db_add_index('watchdog', 'uid', array('uid'));
-}
-
-/**
- * Allow longer type values.
- */
-function dblog_update_7003() {
-  db_change_field('watchdog', 'type', 'type', array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''));
-}
-
-/**
- * @} End of "defgroup updates-6.x-to-7.x"
- * The next series of updates should start at 8000.
- */
Index: modules/forum/forum.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum.install,v
retrieving revision 1.42
diff -u -p -r1.42 forum.install
--- modules/forum/forum.install	11 Feb 2010 03:29:22 -0000	1.42
+++ modules/forum/forum.install	23 Mar 2010 07:40:47 -0000
@@ -189,79 +189,3 @@ function forum_schema() {
   return $schema;
 }
 
-/**
- * Add new index to forum table.
- */
-function forum_update_7000() {
-  db_drop_index('forum', 'nid');
-  db_add_index('forum', 'forum_topic', array('nid', 'tid'));
-}
-
-/**
- * Create new {forum_index} table.
- */
-function forum_update_7001() {
-  $forum_index = array(
-    'description' => 'Maintains denormalized information about node/term relationships.',
-    'fields' => array(
-      'nid' => array(
-        'description' => 'The {node}.nid this record tracks.',
-        'type' => 'int',
-        'unsigned' => TRUE,
-        'not null' => TRUE,
-        'default' => 0,
-      ),
-      'title' => array(
-        'description' => 'The title of this node, always treated as non-markup plain text.',
-        'type' => 'varchar',
-        'length' => 255,
-        'not null' => TRUE,
-        'default' => '',
-      ),
-      'tid' => array(
-         'description' => 'The term ID.',
-         'type' => 'int',
-         'unsigned' => TRUE,
-         'not null' => TRUE,
-         'default' => 0,
-      ),
-      'sticky' => array(
-        'description' => 'Boolean indicating whether the node is sticky.',
-        'type' => 'int',
-        'not null' => FALSE,
-        'default' => 0,
-        'size' => 'tiny',
-      ),
-      'created' => array(
-        'description' => 'The Unix timestamp when the node was created.',
-        'type' => 'int',
-        'unsigned' => TRUE,
-        'not null' => TRUE,
-        'default'=> 0,
-      ),
-      'last_comment_timestamp' => array(
-        'type' => 'int',
-        'not null' => TRUE,
-        'default' => 0,
-        'description' => 'The Unix timestamp of the last comment that was posted within this node, from {comment}.timestamp.',
-      ),
-      'comment_count' => array(
-        'type' => 'int',
-        'unsigned' => TRUE,
-        'not null' => TRUE,
-        'default' => 0,
-        'description' => 'The total number of comments on this node.',
-      ),
-    ),
-    'indexes' => array(
-      'forum_topics' => array('tid', 'sticky', 'last_comment_timestamp'),
-    ),
-    'foreign keys' => array(
-      'node' => 'nid',
-      'taxonomy_term_data' => 'tid',
-    ),
-  );
-  db_create_table('forum_index', $forum_index);
-
-  db_query('INSERT INTO {forum_index} (SELECT n.nid, n.title, f.tid, n.sticky, n.created, ncs.last_comment_timestamp, ncs.comment_count FROM {node} n INNER JOIN {forum} f on n.vid = f.vid INNER JOIN {node_comment_statistics} ncs ON n.nid = ncs.nid)');
-}
Index: modules/node/node.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.install,v
retrieving revision 1.45
diff -u -p -r1.45 node.install
--- modules/node/node.install	1 Mar 2010 07:39:12 -0000	1.45
+++ modules/node/node.install	23 Mar 2010 07:40:47 -0000
@@ -373,243 +373,3 @@ function node_install() {
     ->execute();
 }
 
-/**
- * Implements hook_update_dependencies().
- */
-function node_update_dependencies() {
-  // Node update 7006 migrates node data to fields and therefore must run after
-  // the Field module has been enabled, but before upgrading field data.
-  $dependencies['node'][7006] = array(
-    'system' => 7049,
-  );
-  $dependencies['system'][7050] = array(
-    'node' => 7006,
-  );
-  return $dependencies;
-}
-
-/**
- * @defgroup updates-6.x-to-7.x System updates from 6.x to 7.x
- * @{
- */
-
-/**
- * Fix node type 'module' attribute to avoid name-space conflicts.
- */
-function node_update_7000() {
-  db_update('node_type')
-    ->fields(array('module' => 'node_content'))
-    ->condition('module', 'node')
-    ->execute();
-
-  // Rename the module column to base.
-  db_change_field('node_type', 'module', 'base', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE));
-}
-
-/**
- * Rename {node_revisions} table to {node_revision}.
- */
-function node_update_7001() {
-  db_rename_table('node_revisions', 'node_revision');
-}
-
-/**
- * Extend the node_promote_status index to include all fields required for the node page query.
- */
-function node_update_7002() {
-  db_drop_index('node', 'node_promote_status');
-  db_add_index('node', 'node_frontpage', array('promote', 'status', 'sticky', 'created'));
-}
-
-/**
- * Remove the node_counter if the statistics module is uninstalled.
- */
-function node_update_7003() {
-  if (drupal_get_installed_schema_version('statistics') == SCHEMA_UNINSTALLED) {
-    db_drop_table('node_counter');
-  }
-}
-
-/**
- * Extend the existing default preview and teaser settings to all node types.
- */
-function node_update_7004() {
-  // Get original settings and all types.
-  $original_length = variable_get('teaser_length', 600);
-  $original_preview = variable_get('node_preview', 0);
-
-  // Map old preview setting to new values order.
-  $original_preview ? $original_preview = 2 : $original_preview = 1;
-  drupal_static_reset('_node_types_build');
-  $type_list = node_type_get_types();
-
-  // Apply original settings to all types.
-  foreach ($type_list as $type => $entity) {
-    variable_set('teaser_length_' . $type, $original_length);
-    variable_set('node_preview_' . $type, $original_preview);
-  }
-  // Delete old variable but leave 'teaser_length' for aggregator module upgrade.
-  variable_del('node_preview');
-}
-
-/**
- * Add status/comment/promote and sticky columns to the {node_revision} table.
- */
-function node_update_7005() {
-  foreach(array('status', 'comment', 'promote', 'sticky') as $column) {
-    db_add_field('node_revision', $column, array(
-      'type' => 'int',
-      'not null' => TRUE,
-      'default' => 0,
-    ));
-  }
-}
-
-/**
- * Convert body and teaser from node properties to fields, and migrate status/comment/promote and sticky columns to the {node_revision} table.
- */
-function node_update_7006(&$context) {
-  $context['#finished'] = 0;
-
-  // Get node type info for every invocation.
-  drupal_static_reset('_node_types_build');
-  $node_types = node_type_get_types();
-
-  if (!isset($context['total'])) {
-    // Initial invocation.
-
-    // Re-save node types to create body field instances.
-    foreach ($node_types as $type => $info) {
-      if ($info->has_body) {
-        node_type_save($info);
-      }
-    }
-
-    // Initialize state for future calls.
-    $context['last'] = 0;
-    $context['count'] = 0;
-
-    $query = db_select('node', 'n');
-    $query->join('node_revision', 'nr', 'n.vid = nr.vid');
-    $context['total'] = $query->countQuery()->execute()->fetchField();
-  }
-  else {
-    // Subsequent invocations.
-
-    // Grab the body field ID for field_sql_storage_field_storage_write().
-    $body_field = field_info_field('body');
-    $body_field_id = $body_field['id'];
-
-    $found = FALSE;
-    if ($context['total']) {
-      // Operate on every revision of every node (whee!), in batches.
-      $batch_size = 200;
-      $query = db_select('node_revision', 'nr');
-      $query->innerJoin('node', 'n', 'n.vid = nr.vid');
-      $query
-        ->fields('nr', array('nid', 'vid', 'body', 'teaser', 'format'))
-        ->fields('n', array('type', 'status', 'comment', 'promote', 'sticky'))
-        ->condition('nr.vid', $context['last'], '>')
-        ->orderBy('nr.vid', 'ASC')
-        ->range(0, $batch_size);
-      $revisions = $query->execute();
-
-      // Load each reversion of each node, set up 'body'
-      // appropriately, and save the node's field data.  Note that
-      // node_load() will not return the body or teaser values from
-      // {node_revision} because those columns have been removed from the
-      // schema structure in memory (but not yet from the database),
-      // so we get the values from the explicit query of the table
-      // instead.
-      foreach ($revisions as $revision) {
-        $found = TRUE;
-
-        if ($node_types[$revision->type]->has_body) {
-          $node = (object) array(
-            'nid' => $revision->nid,
-            'vid' => $revision->vid,
-            'type' => $revision->type,
-          );
-          if (!empty($revision->teaser) && $revision->teaser != text_summary($revision->body)) {
-            $node->body[LANGUAGE_NONE][0]['summary'] = $revision->teaser;
-          }
-          // Do this after text_summary() above.
-          $break = '<!--break-->';
-          if (substr($revision->body, 0, strlen($break)) == $break) {
-            $revision->body = substr($revision->body, strlen($break));
-          }
-          $node->body[LANGUAGE_NONE][0]['value'] = $revision->body;
-          // Explicitly store the current default text format if the revision
-          // did not have its own text format. Similar conversions for other
-          // core modules are performed in filter_update_7005(), but we do this
-          // one here since we are already migrating the data.
-          $node->body[LANGUAGE_NONE][0]['format'] = !empty($revision->format) ? $revision->format : variable_get('filter_default_format', 1);
-          // This is a core update and no contrib modules are enabled yet, so
-          // we can assume default field storage for a faster update.
-          field_sql_storage_field_storage_write('node', $node, FIELD_STORAGE_INSERT, array($body_field_id));
-        }
-
-        // Migrate the status columns to the {node_revision} table.
-        db_update('node_revision')
-          ->fields(array(
-            'status' => $revision->status,
-            'comment' => $revision->comment,
-            'promote' => $revision->promote,
-            'sticky' => $revision->sticky,
-          ))
-          ->condition('vid', $revision->vid)
-          ->execute();
-
-        $context['last'] = $revision->vid;
-        $context['count'] += 1;
-      }
-
-      $context['#finished'] = min(0.99, $context['count'] / $context['total']);
-    }
-
-    if (!$found) {
-      // All nodes are processed.
-
-      // Remove the now-obsolete body info from node_revision.
-      db_drop_field('node_revision', 'body');
-      db_drop_field('node_revision', 'teaser');
-      db_drop_field('node_revision', 'format');
-
-      // We're done.
-      $context['#finished'] = 1;
-      return t("!number node body and teaser properties migrated to the 'body' field.", array('!number' => $context['total']));
-    }
-  }
-}
-
-/**
- * Remove column min_word_count.
- */
-function node_update_7007() {
-  db_drop_field('node_type', 'min_word_count');
-}
-
-/**
- * Split the 'administer nodes' permission from 'access content overview'.
- */
-function node_update_7008() {
-  $roles = user_roles(FALSE, 'administer nodes');
-  foreach ($roles as $rid => $role) {
-    user_role_grant_permissions($rid, array('access content overview'));
-  }
-}
-
-/**
- * Convert node languages from the empty string to LANGUAGE_NONE.
- */
-function node_update_7009() {
-  db_update('node')
-    ->fields(array('language' => LANGUAGE_NONE))
-    ->condition('language', '')
-    ->execute();
-}
-
-/**
- * @} End of "defgroup updates-6.x-to-7.x"
- * The next series of updates should start at 8000.
- */
Index: modules/poll/poll.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/poll/poll.install,v
retrieving revision 1.30
diff -u -p -r1.30 poll.install
--- modules/poll/poll.install	30 Jan 2010 00:08:34 -0000	1.30
+++ modules/poll/poll.install	23 Mar 2010 07:40:47 -0000
@@ -137,34 +137,3 @@ function poll_schema() {
   return $schema;
 }
 
-/**
- * Rename {poll_choices} table to {poll_choice} and {poll_votes} to {poll_vote}.
- */
-function poll_update_7001() {
-  db_rename_table('poll_choices', 'poll_choice');
-  db_rename_table('poll_votes', 'poll_vote');
-}
-
-/**
- * Add timestamp field to {poll_vote}.
- */
-function poll_update_7002() {
-  $field = array(
-    'type' => 'int',
-    'not null' => TRUE,
-    'default' => 0,
-  );
-  db_add_field('poll_vote', 'timestamp', $field);
-}
-
-/**
- * Change the weight column to normal int.
- */
-function poll_update_7003() {
-  db_change_field('poll_choice', 'weight', 'weight', array(
-    'type' => 'int',
-    'not null' => TRUE,
-    'default' => 0,
-    'description' => 'The sort order of this choice among all choices for the same node.',
-  ));
-}
Index: modules/profile/profile.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile.install,v
retrieving revision 1.25
diff -u -p -r1.25 profile.install
--- modules/profile/profile.install	3 Feb 2010 18:16:23 -0000	1.25
+++ modules/profile/profile.install	23 Mar 2010 07:40:47 -0000
@@ -146,22 +146,3 @@ function profile_schema() {
   return $schema;
 }
 
-/**
- * Rename {profile_fields} table to {profile_field} and {profile_values} to {profile_value}.
- */
-function profile_update_7001() {
-  db_rename_table('profile_fields', 'profile_field');
-  db_rename_table('profile_values', 'profile_value');
-}
-
-/**
- * Change the weight column to normal int.
- */
-function profile_update_7002() {
-  db_change_field('profile_field', 'weight', 'weight', array(
-    'type' => 'int',
-    'not null' => TRUE,
-    'default' => 0,
-    'description' => 'Weight of field in relation to other profile fields.',
-  ));
-}
Index: modules/search/search.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search.install,v
retrieving revision 1.27
diff -u -p -r1.27 search.install
--- modules/search/search.install	4 Dec 2009 16:49:47 -0000	1.27
+++ modules/search/search.install	23 Mar 2010 07:40:47 -0000
@@ -150,14 +150,3 @@ function search_schema() {
   return $schema;
 }
 
-/**
- * Replace unique keys in 'search_dataset' and 'search_index' by primary keys.
- */
-function search_update_7000() {
-  db_drop_unique_key('search_dataset', 'sid_type');
-  db_add_primary_key('search_dataset', array('sid', 'type'));
-
-  db_drop_index('search_index', 'word');
-  db_drop_unique_key('search_index', 'word_sid_type');
-  db_add_primary_key('search_index', array('word', 'sid', 'type'));
-}
Index: modules/statistics/statistics.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.install,v
retrieving revision 1.25
diff -u -p -r1.25 statistics.install
--- modules/statistics/statistics.install	4 Dec 2009 16:49:47 -0000	1.25
+++ modules/statistics/statistics.install	23 Mar 2010 07:40:47 -0000
@@ -133,30 +133,3 @@ function statistics_schema() {
   return $schema;
 }
 
-/**
- * @defgroup updates-6.x-extra Extra statistics updates for 6.x
- * @{
- */
-
-/**
- * Allow longer referrers.
- */
-function statistics_update_6000() {
-  db_change_field('accesslog', 'url', 'url', array('type' => 'text', 'not null' => FALSE));
-}
-
-/**
- * @} End of "defgroup updates-6.x-extra"
- * The next series of updates should start at 7000.
- */
-
-
-/**
- * @defgroup updates-6.x-to-7.x statistics updates from 6.x to 7.x
- * @{
- */
-
-/**
- * @} End of "defgroup updates-6.x-to-7.x"
- * The next series of updates should start at 8000.
- */
Index: modules/taxonomy/taxonomy.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.install,v
retrieving revision 1.37
diff -u -p -r1.37 taxonomy.install
--- modules/taxonomy/taxonomy.install	6 Mar 2010 06:39:01 -0000	1.37
+++ modules/taxonomy/taxonomy.install	23 Mar 2010 07:40:47 -0000
@@ -229,266 +229,3 @@ function taxonomy_update_dependencies() 
   return $dependencies;
 }
 
-/**
- * Rename taxonomy tables.
- */
-function taxonomy_update_7001() {
-  db_rename_table('term_data', 'taxonomy_term_data');
-  db_rename_table('term_hierarchy', 'taxonomy_term_hierarchy');
-  db_rename_table('term_node', 'taxonomy_term_node');
-  db_rename_table('term_relation', 'taxonomy_term_relation');
-  db_rename_table('term_synonym', 'taxonomy_term_synonym');
-  db_rename_table('vocabulary', 'taxonomy_vocabulary');
-  db_rename_table('vocabulary_node_types', 'taxonomy_vocabulary_node_type');
-}
-
-/**
- * Add {vocabulary}.machine_name column.
- */
-function taxonomy_update_7002() {
-  $field = array(
-    'type' => 'varchar',
-    'length' => 255,
-    'not null' => TRUE,
-    'default' => '',
-    'description' => 'The vocabulary machine name.',
-  );
-
-  db_add_field('taxonomy_vocabulary', 'machine_name', $field);
-
-  foreach (taxonomy_get_vocabularies() as $vid => $vocabulary) {
-    $machine_name = 'vocabulary_' . $vid;
-    db_update('taxonomy_vocabulary')
-      ->fields(array('machine_name' => 'vocabulary_' . $vid))
-      ->condition('vid', $vid)
-      ->execute();
-    field_attach_create_bundle('taxonomy_term', $machine_name);
-  }
-}
-
-/**
- * Remove the related terms setting from vocabularies.
- *
- * This setting has not been used since Drupal 6. The {taxonomy_relations} table
- * itself is retained to allow for data to be upgraded.
- */
-function taxonomy_update_7003() {
-  db_drop_field('taxonomy_vocabulary', 'relations');
-}
-
-/**
- * Move taxonomy vocabulary associations for nodes to fields and field instances.
- */
-function taxonomy_update_7004() {
-  $taxonomy_index = array(
-    'description' => 'Maintains denormalized information about node/term relationships.',
-    'fields' => array(
-      'nid' => array(
-        'description' => 'The {node}.nid this record tracks.',
-        'type' => 'int',
-        'unsigned' => TRUE,
-        'not null' => TRUE,
-        'default' => 0,
-      ),
-      'tid' => array(
-         'description' => 'The term ID.',
-         'type' => 'int',
-         'unsigned' => TRUE,
-         'not null' => TRUE,
-         'default' => 0,
-      ),
-      'sticky' => array(
-        'description' => 'Boolean indicating whether the node is sticky.',
-        'type' => 'int',
-        'not null' => FALSE,
-        'default' => 0,
-        'size' => 'tiny',
-      ),
-      'created' => array(
-        'description' => 'The Unix timestamp when the node was created.',
-        'type' => 'int',
-        'unsigned' => TRUE,
-        'not null' => TRUE,
-        'default'=> 0,
-      ),
-    ),
-    'indexes' => array(
-      'term_node' => array('tid', 'sticky', 'created'),
-    ),
-    'foreign keys' => array(
-      'node' => 'nid',
-      'taxonomy_term_data' => 'tid',
-    ),
-  );
-  db_create_table('taxonomy_index', $taxonomy_index);
-
-  // Use an inline version of Drupal 6 taxonomy_get_vocabularies() here since
-  // we can no longer rely on $vocabulary->nodes from the API function.
-  $result = db_query('SELECT v.*, n.type FROM {taxonomy_vocabulary} v LEFT JOIN {taxonomy_vocabulary_node_type} n ON v.vid = n.vid ORDER BY v.weight, v.name');
-  $vocabularies = array();
-  foreach ($result as $record) {
-    // If no node types are associated with a vocabulary, the LEFT JOIN will
-    // return a NULL value for type.
-    if (isset($record->type)) {
-      $node_types[$record->vid][$record->type] = $record->type;
-      unset($record->type);
-      $record->nodes = $node_types[$record->vid];
-    }
-    elseif (!isset($record->nodes)) {
-      $record->nodes = array();
-    }
-    $vocabularies[$record->vid] = $record;
-  }
-
-  foreach ($vocabularies as $vocabulary) {
-    $field_name = 'taxonomy_' . $vocabulary->machine_name;
-    $field = array(
-      'field_name' => $field_name,
-      'type' => 'taxonomy_term_reference',
-      'cardinality' => $vocabulary->multiple || $vocabulary->tags ? FIELD_CARDINALITY_UNLIMITED : 1,
-      'settings' => array(
-        'required' => $vocabulary->required ? TRUE : FALSE,
-        'allowed_values' => array(
-          array(
-            'vid' => $vocabulary->vid,
-            'parent' => 0,
-          ),
-        ),
-      ),
-    );
-    field_create_field($field);
-
-    foreach ($vocabulary->nodes as $bundle) {
-      $instance = array(
-        'label' => $vocabulary->name,
-        'field_name' => $field_name,
-        'bundle' => $bundle,
-        'object_type' => 'node',
-        'description' => $vocabulary->help,
-        'widget' => array(
-          'type' => $vocabulary->tags ? 'taxonomy_autocomplete' : 'select',
-        ),
-      );
-      field_create_instance($instance);
-    }
-  }
-  db_drop_table('taxonomy_vocabulary_node_type');
-  $fields = array('help', 'multiple', 'required', 'tags');
-  foreach ($fields as $field) {
-    db_drop_field('taxonomy_vocabulary', $field);
-  }
-}
-
-/**
- * Migrate {taxonomy_term_node} table to field storage.
- */
-function taxonomy_update_7005(&$sandbox) {
-  // Since we are upgrading from Drupal 6, we know that only
-  // field_sql_storage.module will be enabled.
-  $field = field_info_field($field['field_name']);
-  $data_table = _field_sql_storage_tablename($field);
-  $revision_table = _field_sql_storage_revision_tablename($field);
-  $etid = _field_sql_storage_etid('node');
-  $value_column = $field['field_name'] . '_value';
-  $columns = array('etid', 'entity_id', 'revision_id', 'bundle', 'delta', $value_column);
-
-  // This is a multi-pass update. On the first call we need to initialize some
-  // variables.
-  if (!isset($sandbox['total'])) {
-    $sandbox['last'] = 0;
-    $sandbox['count'] = 0;
-
-    $query = db_select('taxonomy_term_node', 't');
-    $sandbox['total'] = $query->countQuery()->execute()->fetchField();
-    $found = (bool) $sandbox['total'];
-  }
-  else {
-    // We do each pass in batches of 1000, this should result in a
-    // maximum of 2000 insert queries each operation.
-    $batch = 1000 + $sandbox['last'];
-
-    // Query and save data for the current revision.
-    $result = db_query_range('SELECT td.tid, tn.nid, td.weight, tn.vid, n2.type, n2.created, n2.sticky FROM {taxonomy_term_data} td INNER JOIN {taxonomy_term_node} tn ON td.tid = tn.tid INNER JOIN {node} n2 ON tn.nid = n2.nid INNER JOIN {node} n ON tn.vid = n.vid AND td.vid = :vocabulary_id ORDER BY td.weight ASC', array(':vocabulary_id' => $vocabulary->vid), $sandbox['last'], $batch);
-    $deltas = array();
-    foreach ($result as $record) {
-      $found = TRUE;
-      $sandbox['count'] += 1;
-      // Start deltas from 0, and increment by one for each
-      // term attached to a node.
-      $deltas[$record->nid] = isset($deltas[$record->nid]) ? ++$deltas[$record->nid] : 0;
-      $values = array($etid, $record->nid, $record->vid, $record->type, $deltas[$record->nid], $record->tid);
-      db_insert($data_table)->fields($columns)->values($values)->execute();
-
-      // Update the {taxonomy_index} table.
-      db_insert('taxonomy_index')
-        ->fields(array('nid', 'tid', 'sticky', 'created',))
-        ->values(array($record->nid, $record->tid, $record->sticky, $record->created))
-        ->execute();
-    }
-
-    // Query and save data for all revisions.
-    $result = db_query('SELECT td.tid, tn.nid, td.weight, tn.vid, n.type FROM {taxonomy_term_data} td INNER JOIN {taxonomy_term_node} tn ON td.tid = tn.tid AND td.vid = :vocabulary_id INNER JOIN {node} n ON tn.nid = n.nid ORDER BY td.weight ASC', array(':vocabulary_id' => $vocabulary->vid), $sandbox['last'][$batch]);
-    $deltas = array();
-    foreach ($result as $record) {
-      $found = TRUE;
-      $sandbox['count'] += 1;
-      // Start deltas at 0, and increment by one for each term attached to a revision.
-      $deltas[$record->vid] = isset($deltas[$record->vid]) ? ++$deltas[$record->vid] : 0;
-      $values = array($etid, $record->nid, $record->vid, $record->type, $deltas[$record->vid], $record->tid);
-      db_insert($revision_table)->fields($columns)->values($values)->execute();
-    }
-    $sandbox['last'] = $batch;
-  }
-  if (!$found) {
-   db_drop_table('taxonomy_term_node');
-  }
-}
-
-/**
- * Add {taxonomy_term_data}.format column.
- */
-function taxonomy_update_7006() {
-  db_add_field('taxonomy_term_data', 'format', array(
-    'type' => 'int',
-    'size' => 'small',
-    'not null' => TRUE,
-    'default' => 0,
-    'description' => 'The {filter_format}.format of the description.',
-  ));
-}
-
-/**
- * Add index on {taxonomy_term_data}.name column to speed up taxonomy_get_term_by_name().
- */
-function taxonomy_update_7007() {
-  db_add_index('taxonomy_term_data', 'name', array('name'));
-}
-
-/**
- * Change the weight columns to normal int.
- */
-function taxonomy_update_7008() {
-  db_drop_index('taxonomy_term_data', 'taxonomy_tree');
-  db_change_field('taxonomy_term_data', 'weight', 'weight', array(
-    'type' => 'int',
-    'not null' => TRUE,
-    'default' => 0,
-    'description' => 'The weight of this term in relation to other terms.',
-  ), array(
-    'indexes' => array(
-       'taxonomy_tree' => array('vid', 'weight', 'name'),
-    ),
-  ));
-
-  db_drop_index('taxonomy_vocabulary', 'list');
-  db_change_field('taxonomy_vocabulary', 'weight', 'weight', array(
-    'type' => 'int',
-    'not null' => TRUE,
-    'default' => 0,
-    'description' => 'The weight of this vocabulary in relation to other vocabularies.',
-  ), array(
-    'indexes' => array(
-      'list' => array('weight', 'name'),
-    ),
-  ));
-}
Index: modules/tracker/tracker.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/tracker/tracker.install,v
retrieving revision 1.4
diff -u -p -r1.4 tracker.install
--- modules/tracker/tracker.install	20 Mar 2010 15:06:51 -0000	1.4
+++ modules/tracker/tracker.install	23 Mar 2010 07:40:47 -0000
@@ -104,101 +104,3 @@ function tracker_schema() {
   return $schema;
 }
 
-/**
- * @defgroup updates-6.x-to-7.x Tracker updates from 6.x to 7.x
- * @{
- */
-
-/**
- * Create new tracker_node and tracker_user tables.
- */
-function tracker_update_7000() {
-  $schema['tracker_node'] = array(
-    'description' => 'Tracks when nodes were last changed or commented on',
-    'fields' => array(
-      'nid' => array(
-        'description' => 'The {node}.nid this record tracks.',
-        'type' => 'int',
-        'unsigned' => TRUE,
-        'not null' => TRUE,
-        'default' => 0,
-      ),
-      'published' => array(
-        'description' => 'Boolean indicating whether the node is published.',
-        'type' => 'int',
-        'not null' => FALSE,
-        'default' => 0,
-        'size' => 'tiny',
-      ),
-      'changed' => array(
-        'description' => 'The Unix timestamp when the node was most recently saved or commented on.',
-        'type' => 'int',
-        'unsigned' => TRUE,
-        'not null' => TRUE,
-        'default' => 0,
-      ),
-    ),
-    'indexes' => array(
-      'tracker' => array('published', 'changed'),
-    ),
-    'primary key' => array('nid'),
-    'foreign keys' => array(
-      'node' => 'nid',
-    ),
-  );
-
-  $schema['tracker_user'] = array(
-    'description' => 'Tracks when nodes were last changed or commented on, for each user that authored the node or one of its comments.',
-    'fields' => array(
-      'nid' => array(
-        'description' => 'The {node}.nid this record tracks.',
-        'type' => 'int',
-        'unsigned' => TRUE,
-        'not null' => TRUE,
-        'default' => 0,
-      ),
-      'uid' => array(
-        'description' => 'The {users}.uid of the node author or commenter.',
-        'type' => 'int',
-        'not null' => TRUE,
-        'default' => 0,
-      ),
-      'published' => array(
-        'description' => 'Boolean indicating whether the node is published.',
-        'type' => 'int',
-        'not null' => FALSE,
-        'default' => 0,
-        'size' => 'tiny',
-      ),
-      'changed' => array(
-        'description' => 'The Unix timestamp when the node was most recently saved or commented on.',
-        'type' => 'int',
-        'unsigned' => TRUE,
-        'not null' => TRUE,
-        'default' => 0,
-      ),
-    ),
-    'indexes' => array(
-      'tracker' => array('uid', 'published', 'changed'),
-    ),
-    'primary key' => array('nid', 'uid'),
-    'foreign keys' => array(
-      'node' => 'nid',
-      'users' => 'uid',
-    ),
-  );
-
-  foreach ($schema as $name => $table) {
-    db_create_table($name, $table);
-  }
-
-  $max_nid = db_query('SELECT MAX(nid) FROM {node}')->fetchField();
-  if ($max_nid != 0) {
-    variable_set('tracker_index_nid', $max_nid);
-  }
-}
-
-/**
- * @} End of "defgroup updates-6.x-to-7.x"
- * The next series of updates should start at 8000.
- */
Index: modules/trigger/trigger.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/trigger/trigger.install,v
retrieving revision 1.16
diff -u -p -r1.16 trigger.install
--- modules/trigger/trigger.install	4 Dec 2009 16:49:47 -0000	1.16
+++ modules/trigger/trigger.install	23 Mar 2010 07:40:47 -0000
@@ -50,19 +50,3 @@ function trigger_install() {
   actions_synchronize();
 }
 
-/**
- * Adds operation names to the hook names and drops the "op" field.
- */
-function trigger_update_7000() {
-  $result = db_query("SELECT hook, op, aid FROM {trigger_assignments} WHERE op <> ''");
-
-  foreach ($result as $record) {
-    db_update('trigger_assignments')
-      ->fields(array('hook' => $record->hook . '_' . $record->op))
-      ->condition('hook', $record->hook)
-      ->condition('op', $record->op)
-      ->condition('aid', $record->aid)
-      ->execute();
-  }
-  db_drop_field('trigger_assignments', 'op');
-}
Index: modules/update/update.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/update/update.install,v
retrieving revision 1.16
diff -u -p -r1.16 update.install
--- modules/update/update.install	15 Jan 2010 10:12:36 -0000	1.16
+++ modules/update/update.install	23 Mar 2010 07:40:47 -0000
@@ -159,11 +159,3 @@ function _update_requirement_check($proj
   return $requirement;
 }
 
-/**
- * Create a queue to store tasks for requests to fetch available update data.
- */
-function update_update_7000() {
-  module_load_include('inc', 'system', 'system.queue');
-  $queue = DrupalQueue::get('update_fetch_tasks');
-  $queue->createQueue();
-}
Index: modules/user/user.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.install,v
retrieving revision 1.40
diff -u -p -r1.40 user.install
--- modules/user/user.install	1 Mar 2010 07:39:12 -0000	1.40
+++ modules/user/user.install	23 Mar 2010 07:40:47 -0000
@@ -303,274 +303,3 @@ function user_install() {
   }
 }
 
-/**
- * @defgroup user-updates-6.x-to-7.x User updates from 6.x to 7.x
- * @{
- */
-
-/**
- * Increase the length of the password field to accommodate better hashes.
- *
- * Also re-hashes all current passwords to improve security. This may be a
- * lengthy process, and is performed batch-wise.
- */
-function user_update_7000(&$sandbox) {
-  $sandbox['#finished'] = 0;
-  // Lower than DRUPAL_HASH_COUNT to make the update run at a reasonable speed.
-  $hash_count_log2 = 11;
-  // Multi-part update.
-  if (!isset($sandbox['user_from'])) {
-    db_change_field('users', 'pass', 'pass', array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''));
-    $sandbox['user_from'] = 0;
-    $sandbox['user_count'] = db_query("SELECT COUNT(uid) FROM {users}")->fetchField();
-  }
-  else {
-    require_once DRUPAL_ROOT . '/' . variable_get('password_inc', 'includes/password.inc');
-    //  Hash again all current hashed passwords.
-    $has_rows = FALSE;
-    // Update this many per page load.
-    $count = 1000;
-    $result = db_query_range("SELECT uid, pass FROM {users} WHERE uid > 0 ORDER BY uid", $sandbox['user_from'], $count);
-    foreach ($result as $account) {
-      $has_rows = TRUE;
-      $new_hash = user_hash_password($account->pass, $hash_count_log2);
-      if ($new_hash) {
-        // Indicate an updated password.
-        $new_hash  = 'U' . $new_hash;
-        db_update('users')
-          ->fields(array('pass' => $new_hash))
-          ->condition('uid', $account->uid)
-          ->execute();
-      }
-    }
-    $sandbox['#finished'] = $sandbox['user_from']/$sandbox['user_count'];
-    $sandbox['user_from'] += $count;
-    if (!$has_rows) {
-      $sandbox['#finished'] = 1;
-      return t('User passwords rehashed to improve security');
-    }
-  }
-}
-
-/**
- * Remove the 'threshold', 'mode' and 'sort' columns from the {users} table.
- *
- * These fields were previously used to store per-user comment settings.
- */
-
-function user_update_7001() {
-  db_drop_field('users', 'threshold');
-  db_drop_field('users', 'mode');
-  db_drop_field('users', 'sort');
-}
-
-/**
- * Convert user time zones from time zone offsets to time zone names.
- */
-function user_update_7002(&$sandbox) {
-  $sandbox['#finished'] = 0;
-
-  // Multi-part update.
-  if (!isset($sandbox['user_from'])) {
-    db_change_field('users', 'timezone', 'timezone', array('type' => 'varchar', 'length' => 32, 'not null' => FALSE));
-    $sandbox['user_from'] = 0;
-    $sandbox['user_count'] = db_query("SELECT COUNT(uid) FROM {users}")->fetchField();
-    $sandbox['user_not_migrated'] = 0;
-  }
-  else {
-    $timezones = system_time_zones();
-    // Update this many per page load.
-    $count = 10000;
-    $contributed_date_module = db_column_exists('users', 'timezone_name');
-    $contributed_event_module = db_column_exists('users', 'timezone_id');
-
-    $results = db_query_range("SELECT uid FROM {users} ORDER BY uid", $sandbox['user_from'], $count);
-    foreach ($results as $account) {
-      $timezone = NULL;
-      // If the contributed Date module has created a users.timezone_name
-      // column, use this data to set each user's time zone.
-      if ($contributed_date_module) {
-        $date_timezone = db_query("SELECT timezone_name FROM {users} WHERE uid = :uid", array(':uid' => $account->uid))->fetchField();
-        if (isset($timezones[$date_timezone])) {
-          $timezone = $date_timezone;
-        }
-      }
-      // If the contributed Event module has stored user time zone information
-      // use that information to update the user accounts.
-      if (!$timezone && $contributed_event_module) {
-        try {
-          $event_timezone = db_query("SELECT t.name FROM {users} u LEFT JOIN {event_timezones} t ON u.timezone_id = t.timezone WHERE u.uid = :uid", array(':uid' => $account->uid))->fetchField();
-          $event_timezone = str_replace(' ', '_', $event_timezone);
-          if (isset($timezones[$event_timezone])) {
-            $timezone = $event_timezone;
-          }
-        }
-        catch (PDOException $e) {
-          // Ignore error if event_timezones table does not exist or unexpected
-          // schema found.
-        }
-      }
-      if ($timezone) {
-        db_update('users')
-          ->fields(array('timezone' => $timezone))
-          ->condition('uid', $account->uid)
-          ->execute();
-      }
-      else {
-        $sandbox['user_not_migrated']++;
-        db_update('users')
-          ->fields(array('timezone' => NULL))
-          ->condition('uid', $account->uid)
-          ->execute();
-      }
-      $sandbox['user_from']++;
-    }
-
-    $sandbox['#finished'] = $sandbox['user_from'] / $sandbox['user_count'];
-    if ($sandbox['user_from'] == $sandbox['user_count']) {
-      if ($sandbox['user_not_migrated'] > 0) {
-        variable_set('empty_timezone_message', 1);
-        drupal_set_message('Some user time zones have been emptied and need to be set to the correct values. Use the new ' . l('time zone options', 'admin/config/regional/settings') . ' to choose whether to remind users at login to set the correct time zone.', 'warning');
-      }
-      return t('Migrated user time zones');
-    }
-  }
-}
-
-/**
- * Update user settings for cancelling user accounts.
- *
- * Prior to 7.x, users were not able to cancel their accounts. When
- * administrators deleted an account, all contents were assigned to uid 0,
- * which is the same as the 'user_cancel_reassign' method now.
- */
-function user_update_7003() {
-  // Set the default account cancellation method.
-  variable_set('user_cancel_method', 'user_cancel_reassign');
-  // Re-assign notification setting.
-  if ($setting = variable_get('user_mail_status_deleted_notify', FALSE)) {
-    variable_set('user_mail_status_canceled_notify', $setting);
-    variable_del('user_mail_status_deleted_notify');
-  }
-  // Re-assign "Account deleted" mail strings to "Account canceled" mail.
-  if ($setting = variable_get('user_mail_status_deleted_subject', FALSE)) {
-    variable_set('user_mail_status_canceled_subject', $setting);
-    variable_del('user_mail_status_deleted_subject');
-  }
-  if ($setting = variable_get('user_mail_status_deleted_body', FALSE)) {
-    variable_set('user_mail_status_canceled_body', $setting);
-    variable_del('user_mail_status_deleted_body');
-  }
-}
-
-/**
- * Add the user's pictures to the {file} table and make them managed files.
- */
-function user_update_7004(&$sandbox) {
-
-  $picture_field = array(
-    'type' => 'int',
-    'not null' => TRUE,
-    'default' => 0,
-    'description' => t("Foreign key: {file}.fid of user's picture."),
-  );
-
-  if (!isset($sandbox['progress'])) {
-    // Check that the field hasn't been updated in an aborted run of this
-    // update.
-    if (!db_column_exists('users', 'picture_fid')) {
-      // Add a new field for the fid.
-      db_add_field('users', 'picture_fid', $picture_field);
-    }
-
-    // Initialize batch update information.
-    $sandbox['progress'] = 0;
-    $sandbox['last_user_processed'] = -1;
-    $sandbox['max'] = db_query("SELECT COUNT(*) FROM {users} WHERE picture <> ''")->fetchField();
-  }
-
-  // As a batch operation move the photos into the {file} table and update the
-  // {users} records.
-  $limit = 500;
-  $result = db_query_range("SELECT uid, picture FROM {users} WHERE picture <> '' AND uid > :uid ORDER BY uid", 0, $limit, array(':uid' => $sandbox['last_user_processed']));
-  foreach ($result as $user) {
-    // Don't bother adding files that don't exist.
-    if (file_exists($user->picture)) {
-
-      // Check if the file already exists.
-      $files = file_load_multiple(array(), array('uri' => $user->picture));
-      if (count($files)) {
-        $file = reset($files);
-      }
-      else {
-        // Create a file object.
-        $file = new stdClass();
-        $file->uri      = $user->picture;
-        $file->filename = basename($file->uri);
-        $file->filemime = file_get_mimetype($file->uri);
-        $file->uid      = $user->uid;
-        $file->status   = FILE_STATUS_PERMANENT;
-        $file = file_save($file);
-      }
-
-      db_update('users')
-        ->fields(array('picture_fid' => $file->fid))
-        ->condition('uid', $user->uid)
-        ->execute();
-    }
-
-    // Update our progress information for the batch update.
-    $sandbox['progress']++;
-    $sandbox['last_user_processed'] = $user->uid;
-  }
-
-  // Indicate our current progress to the batch update system. If there's no
-  // max value then there's nothing to update and we're finished.
-  $sandbox['#finished'] = empty($sandbox['max']) ? 1 : ($sandbox['progress'] / $sandbox['max']);
-
-  // When we're finished, drop the old picture field and rename the new one to
-  // replace it.
-  if (isset($sandbox['#finished']) && $sandbox['#finished'] == 1) {
-    db_drop_field('users', 'picture');
-    db_change_field('users', 'picture_fid', 'picture', $picture_field);
-  }
-}
-
-/**
- * Change the users table to allow longer email addresses - 254 characters instead of 64.
- */
-function user_update_7005(&$sandbox) {
-  $schema = user_schema();
-  db_change_field('users', 'mail', 'mail', $schema['users']['fields']['mail']);
-}
-
-/**
- * @} End of "defgroup user-updates-6.x-to-7.x"
- * The next series of updates should start at 8000.
- */
-
-/**
- * Add module data to {role_permission}.
- */
-function user_update_7006(&$sandbox) {
-  $module_field = array(
-    'type' => 'varchar',
-    'length' => 255,
-    'not null' => TRUE,
-    'default' => '',
-    'description' => "The module declaring the permission.",
-  );
-  // Check that the field hasn't been updated in an aborted run of this
-  // update.
-  if (!db_column_exists('role_permission', 'module')) {
-    // Add a new field for the fid.
-    db_add_field('role_permission', 'module', $module_field);
-  }
-  $permissions = user_permission_get_modules();
-  foreach ($permissions as $key => $value) {
-    db_update('role_permission')
-      ->fields(array('module' => $value))
-      ->condition('permission', $key)
-      ->execute();
-  }
-}
