Index: includes/update.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/update.inc,v
retrieving revision 1.47
diff -u -r1.47 update.inc
--- includes/update.inc	1 May 2010 08:12:22 -0000	1.47
+++ includes/update.inc	4 May 2010 11:08:40 -0000
@@ -324,20 +324,28 @@
     db_drop_index('system', 'type_name');
     db_add_index('system', 'type_name', array(array('type', 12), 'name'));
     // Add 7.x indexes.
+    db_drop_index('system', 'system_list');
     db_add_index('system', 'system_list', array('weight', 'name'));
 
     // Add the cache_path table.
+    if (db_table_exists('cache_path')) {
+      db_drop_table('cache_path');
+    }
     $schema['cache_path'] = drupal_get_schema_unprocessed('system', 'cache');
     $schema['cache_path']['description'] = 'Cache table used for path alias lookups.';
     db_create_table('cache_path', $schema['cache_path']);
 
     // system_update_7042() renames columns, but these are needed to bootstrap.
     // Add empty columns for now.
+    db_drop_field('url_alias', 'source');
     db_add_field('url_alias', 'source', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''));
+    db_drop_field('url_alias', 'alias');
     db_add_field('url_alias', 'alias', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''));
 
     // Add new columns to {menu_router}.
+    db_drop_field('menu_router', 'delivery_callback');
     db_add_field('menu_router', 'delivery_callback', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''));
+    db_drop_field('menu_router', 'context');
     db_add_field('menu_router', 'context', array(
       'description' => 'Only for local tasks (tabs) - the context of a local task to control its placement.',
       'type' => 'int',
@@ -346,10 +354,15 @@
     ));
     db_drop_index('menu_router', 'tab_parent');
     db_add_index('menu_router', 'tab_parent', array(array('tab_parent', 64), 'weight', 'title'));
+    db_drop_field('menu_router', 'theme_callback');
     db_add_field('menu_router', 'theme_callback', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''));
+    db_drop_field('menu_router', 'theme_arguments');
     db_add_field('menu_router', 'theme_arguments', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''));
 
     // Add the role_permission table.
+    if (db_table_exists('role_permission')) {
+      db_drop_table('role_permission');
+    }
     $schema['role_permission'] = array(
       'fields' => array(
         'rid' => array(
@@ -373,6 +386,7 @@
 
     // Drops and recreates semaphore value index.
     db_drop_index('semaphore', 'expire');
+    db_drop_index('semaphore', 'value');
     db_add_index('semaphore', 'value', array('value'));
 
     $schema['date_format_type'] = array(
@@ -459,8 +473,20 @@
       'primary key' => array('type', 'language'),
     );
 
+    // Add the date_format_type table.
+    if (db_table_exists('date_format_type')) {
+      db_drop_table('date_format_type');
+    }
     db_create_table('date_format_type', $schema['date_format_type']);
+    // Add the date_formats table.
+    if (db_table_exists('date_formats')) {
+      db_drop_table('date_formats');
+    }
     db_create_table('date_formats', $schema['date_formats']);
+    // Add the date_format_locale table.
+    if (db_table_exists('date_format_locale')) {
+      db_drop_table('date_format_locale');
+    }
     db_create_table('date_format_locale', $schema['date_format_locale']);
 
     // Add the queue table.

