Index: path_redirect.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/path_redirect/path_redirect.install,v
retrieving revision 1.2.2.14
diff -u -r1.2.2.14 path_redirect.install
--- path_redirect.install	8 Mar 2008 02:09:53 -0000	1.2.2.14
+++ path_redirect.install	14 Apr 2008 02:08:11 -0000
@@ -82,6 +82,7 @@
 
 /**
  * Clear the menu cache since paths have changed; increase query string length.
+ * Use rid as primary key; recreate unique key on path.
  */
 function path_redirect_update_4() {
   cache_clear_all(NULL, 'cache_menu');
@@ -90,9 +91,17 @@
     case 'mysql':
     case 'mysqli':
       $ret[] = update_sql("ALTER TABLE {path_redirect} MODIFY query varchar(255) NOT NULL");
+      $ret[] = update_sql("ALTER TABLE {path_redirect} DROP PRIMARY KEY");
+      $ret[] = update_sql("ALTER TABLE {path_redirect} DROP KEY rid");
+      $ret[] = update_sql("ALTER TABLE {path_redirect} ADD PRIMARY KEY (rid)");
+      $ret[] = update_sql("ALTER TABLE {path_redirect} ADD UNIQUE KEY (path)");
       break;
     case 'pgsql':
       $ret[] = update_sql("ALTER TABLE {path_redirect} ALTER query TYPE varchar(255)");
+      $ret[] = update_sql("ALTER TABLE {path_redirect} DROP CONSTRAINT {path_redirect}_pkey");
+      $ret[] = update_sql("ALTER TABLE {path_redirect} DROP CONSTRAINT {path_redirect}_rid_key");
+      $ret[] = update_sql("ALTER TABLE {path_redirect} ADD PRIMARY KEY (rid)");
+      $ret[] = update_sql("ALTER TABLE {path_redirect} ADD UNIQUE (path)");
       break;
   }
   drupal_set_message(t('Database tables for the Path Redirect module have been updated.'));
