diff --git a/user_stats.install b/user_stats.install
index 054938b..3bca727 100644
--- a/user_stats.install
+++ b/user_stats.install
@@ -52,7 +52,7 @@ function user_stats_schema() {
       ),
       'ip_address' => array(
         'type' => 'varchar',
-        'length' => 15,
+        'length' => 40,
         'not null' => TRUE,
         'default' => '',
         'description' => "The user's IP address.",
@@ -238,3 +238,35 @@ function user_stats_update_6101() {
   // See http://drupal.org/node/224333#update_sql.
   return t('TODO Add a descriptive string here to show in the UI.') /* $ret */;
 }
+
+/**
+ * Implements hook_update_N().
+ * Expands the width of the field table to 40.
+ */
+function user_stats_update_6102(&$sandbox) {
+  $ip_address = array(
+    'type' => 'varchar',
+    'length' => 40,
+    'not null' => TRUE,
+    'default' => '',
+    'description' => "The user's IP address.",
+  );
+  $ret = array();
+  db_change_field($ret, 'user_stats_ips', 'ip_address', 'ip_address', $ip_address);
+  return $ret;
+}
+
+/**
+ * Implements hook_update_N().
+ * Expands the width of the field table to 40.
+ */
+function user_stats_update_7102(&$sandbox) {
+  $ip_address = array(
+    'type' => 'varchar',
+    'length' => 40,
+    'not null' => TRUE,
+    'default' => '',
+    'description' => "The user's IP address.",
+  );
+  db_change_field('user_stats_ips', 'ip_address', 'ip_address', $ip_address);
+}
