? db_schema_fix_1.patch
Index: README.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/password_policy/README.txt,v
retrieving revision 1.5
diff -u -p -r1.5 README.txt
--- README.txt	8 Feb 2008 17:17:14 -0000	1.5
+++ README.txt	14 Apr 2010 15:33:11 -0000
@@ -51,7 +51,7 @@ The module also implements configurable 
 
 Requirements
 ==========================================
-This version of the module is written and tested with a Drupal 6
+Drupal 6.x and MySQL 5.0.3 or greater required.
 
 Credits
 ==========================================
Index: password_policy.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/password_policy/password_policy.install,v
retrieving revision 1.9
diff -u -p -r1.9 password_policy.install
--- password_policy.install	13 Apr 2010 20:00:29 -0000	1.9
+++ password_policy.install	14 Apr 2010 15:33:12 -0000
@@ -93,6 +93,15 @@ function password_policy_update_6001() {
   return $ret;
 }
 
+/**
+ * Fix for http://drupal.org/node/583902
+ */
+function password_policy_update_6002() {
+  $ret = array();
+  $ret[] = update_sql('alter table password_policy change policy policy varchar(1024) not null');  
+  return $ret;
+}
+
 //////////////////////////////////////////////////////////////////////////////
 // Schema API hooks
 
@@ -131,9 +140,9 @@ function password_policy_schema() {
         ),
         'policy' => array(
           'description' => t("The policy's serialized data."),
-          'type' => 'text',
+          'type' => 'varchar',
+          'length' => 1024,
           'not null' => TRUE,
-          'default' => '',
         ),
         'created' => array(
           'description' => t("Timestamp for when the policy was created."),
