Index: password_policy.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/password_policy/password_policy.install,v
retrieving revision 1.1.4.1
diff -u -r1.1.4.1 password_policy.install
--- password_policy.install	11 Jul 2008 17:26:53 -0000	1.1.4.1
+++ password_policy.install	14 Jul 2008 18:06:09 -0000
@@ -1,5 +1,5 @@
 <?php
-// $Id: password_policy.install,v 1.1.4.1 2008/07/11 17:26:53 miglius Exp $
+// $Id: password_policy.install,v 1.1 2006/09/25 05:01:19 dayre Exp $
 
 /**
  * Implementation of the hook_install() module.
@@ -20,13 +20,15 @@
       db_query("CREATE TABLE {password_policy_users} (
         uid int(10) unsigned NOT NULL default '0',
         pass varchar(32) NOT NULL default '',
-        created int(11) NOT NULL default '0'
+        created int(11) NOT NULL default '0',
+        KEY (uid)
       ) /*!40100 DEFAULT CHARACTER SET utf8 */");
       db_query("CREATE TABLE {password_policy_expiration} (
         uid int(10) unsigned NOT NULL,
         warning int(11) default NULL,
         blocked int(11) default NULL,
-        unblocked int(11) default NULL
+        unblocked int(11) default NULL,
+        KEY (uid)
       ) /*!40100 DEFAULT CHARACTER SET utf8 */");
       break;
   }
@@ -80,3 +82,17 @@
 
   return $ret;
 }
+
+function password_policy_update_5000() {
+  $ret = array();
+
+  switch ($GLOBALS['db_type']) {
+    case 'mysql':
+    case 'mysqli':
+      $ret[] = update_sql("ALTER TABLE {password_policy_users} ADD KEY (uid)");
+      $ret[] = update_sql("ALTER TABLE {password_policy_expiration} ADD KEY (uid)");
+    break;
+  }
+
+  return $ret;
+}
\ No newline at end of file
