Index: modules/system/system.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.install,v
retrieving revision 1.130
diff -u -F^f -r1.130 system.install
--- modules/system/system.install	5 Jul 2007 08:48:58 -0000	1.130
+++ modules/system/system.install	5 Jul 2007 17:13:53 -0000
@@ -2771,15 +2771,9 @@ function system_update_6001() {
  */
 function system_update_6002() {
   $ret = array();
-  switch ($GLOBALS['db_type']) {
-    case 'pgsql':
-      db_change_column($ret, 'variable', 'name', 'name', 'varchar(128)', array('not null' => TRUE, 'default' => "''"));
-      break;
-    case 'mysql':
-    case 'mysqli':
-      $ret[] = update_sql("ALTER TABLE {variable} CHANGE name name varchar(128) NOT NULL default ''");
-      break;
-  }
+  db_drop_primary_key($ret, 'variable');
+  db_change_field($ret, 'variable', 'name', 'name', array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''));
+  db_add_primary_key($ret, 'variable', array('name'));
   return $ret;
 }
 
