diff --git a/referral.install b/referral.install
index f729686..b7fa8fb 100755
--- a/referral.install
+++ b/referral.install
@@ -53,10 +53,8 @@ function referral_schema() {
         'description' => t('Network address.'),
       ),
       'http_referer' => array(
-        'type' => 'varchar',
-        'length' => 255,
+        'type' => 'text',
         'not null' => TRUE,
-        'default' => '',
         'description' => t('URL of referer site.'),
       ),
     ),
@@ -95,3 +93,16 @@ function referral_update_7001() {
   // If $display_mode is set to 0, we should show link on user profile page.
   variable_set('referral_show_on_user_profile', !$display_mode);
 }
+
+/**
+ * Change type of {referral}.http_referer from varchar to text.
+ */
+function referral_update_7001() {
+  if (db_field_exists('referral', 'http_referer')) {
+    db_change_field('referral', 'http_referer', 'http_referer', array(
+      'type' => 'text',
+      'not null' => TRUE,
+      'description' => t('URL of referer site.'),
+    ));
+  }
+}
