diff --git a/uc_cart/uc_cart.install b/uc_cart/uc_cart.install
index 53474a5..cf3ccac 100644
--- a/uc_cart/uc_cart.install
+++ b/uc_cart/uc_cart.install
@@ -37,7 +37,6 @@ function uc_cart_schema() {
       'qty' => array(
         'description' => 'The number of this product in the cart.',
         'type' => 'int',
-        'size' => 'small',
         'unsigned' => TRUE,
         'not null' => TRUE,
         'default' => 0,
@@ -111,3 +110,11 @@ function uc_cart_update_7000() {
   variable_del('uc_msg_order_new_user_format');
   variable_del('uc_msg_continue_shopping_format');
 }
+
+/**
+ * Change qty field type in uc_cart_products from small_int to int to allow orders of more than 65535 products.
+ */
+function uc_cart_update_7001() {
+    db_change_field('uc_cart_products', 'qty', 'qty',
+      array('type' => 'int', 'unsigned' => TRUE, 'default' => 0, 'not null' => TRUE)):
+}
diff --git a/uc_order/uc_order.install b/uc_order/uc_order.install
index 02c51c8..3fe2a23 100644
--- a/uc_order/uc_order.install
+++ b/uc_order/uc_order.install
@@ -503,7 +503,6 @@ function uc_order_schema() {
       'qty' => array(
         'description' => 'The number of the same product ordered.',
         'type' => 'int',
-        'size' => 'small',
         'unsigned' => TRUE,
         'not null' => TRUE,
         'default' => 0,
@@ -732,3 +731,11 @@ function uc_order_update_7002() {
     db_add_index('uc_order_products', 'nid', array('nid'));
   }
 }
+
+/**
+ * Update qty field in uc_order_products table from small_int to int to allow for orders larger than 65535.
+ */ 
+function uc_order_update_7003() {
+  db_change_field('uc_order_products', 'qty', 'qty',
+    array('type' => 'int', 'unsigned' => TRUE, 'default' => 0, 'not null' => TRUE));
+} 
