diff --git a/package/hosting_package.install b/package/hosting_package.install
index 8c349ce..00058d3 100644
--- a/package/hosting_package.install
+++ b/package/hosting_package.install
@@ -66,8 +66,8 @@ function hosting_package_schema() {
         'default' => 0,
       ),
       'filename' => array(
-        'type' => 'varchar',
-        'length' => 255,
+        'type' => 'text',
+        'size' => 'medium',
         'not null' => TRUE,
         'default' => '',
       ),
@@ -535,3 +535,17 @@ return hosting_package_block_visibility();
   return $ret;
 
 }
+
+/**
+ * Change filename field to longtext.
+ */
+function hosting_package_update_7301() {
+  $spec = array(
+        'type' => 'text',
+        'size' => 'medium',
+        'not null' => TRUE,
+        'default' => '',
+  );
+
+  db_change_field('hosting_package_instance', 'filename', 'filename', $spec);
+}
