diff --git a/modules/customer/commerce_customer.install b/modules/customer/commerce_customer.install index 7789259..2ae2889 100644 --- a/modules/customer/commerce_customer.install +++ b/modules/customer/commerce_customer.install @@ -19,8 +19,7 @@ function commerce_customer_schema() { 'description' => 'The current {commerce_customer_profile_revision}.revision_id version identifier.', 'type' => 'int', 'unsigned' => TRUE, - 'not null' => TRUE, - 'default' => 0, + 'not null' => FALSE, ), 'type' => array( 'description' => 'The {commerce_customer_profile_type}.type of this profile.', @@ -252,3 +251,17 @@ function commerce_customer_update_7101() { return t('Database indexes added to the uid and type columns of the commerce_customer_profile table.'); } + +/** + * Allow NULL values for revision_id on {commerce_customer} to avoid locking issues. + */ +function commerce_customer_update_7102() { + db_change_field('commerce_customer_profile', 'revision_id', array( + 'description' => 'The current {commerce_customer_profile_revision}.revision_id version identifier.', + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => FALSE, + )); + + return t('Schema for the commerce_customer_profile has been updated.'); +} diff --git a/modules/order/commerce_order.install b/modules/order/commerce_order.install index d29bb23..907a7f8 100644 --- a/modules/order/commerce_order.install +++ b/modules/order/commerce_order.install @@ -26,7 +26,6 @@ function commerce_order_schema() { 'type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, - 'default' => 0, ), 'type' => array( 'description' => 'The type of this order.', @@ -458,3 +457,17 @@ function commerce_order_update_7108() { return t('Schema for the commerce_order and commerce_order_revision tables has been updated.'); } + +/** + * Remove default value for revision_id on {commerce_order}. + */ +function commerce_order_update_7109() { + db_change_field('commerce_order', 'revision_id', array( + 'description' => 'The current {commerce_order_revision}.revision_id version identifier.', + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => FALSE, + )); + + return t('Schema for the commerce_order has been updated.'); +} diff --git a/modules/payment/commerce_payment.install b/modules/payment/commerce_payment.install index dd36c11..f136bf6 100644 --- a/modules/payment/commerce_payment.install +++ b/modules/payment/commerce_payment.install @@ -25,8 +25,7 @@ function commerce_payment_schema() { 'description' => 'The current {commerce_payment_transaction_revision}.revision_id version identifier.', 'type' => 'int', 'unsigned' => TRUE, - 'not null' => TRUE, - 'default' => 0, + 'not null' => FALSE, ), 'uid' => array( 'description' => 'The {users}.uid that created this transaction.', @@ -280,3 +279,17 @@ function commerce_payment_update_7101() { return t('Database indexes added to the uid and order_id columns of the commerce_payment_transaction table.'); } + +/** + * Allow NULL values for revision_id on {commerce_payment_transaction} to avoid locking issues. + */ +function commerce_payment_update_7102() { + db_change_field('commerce_payment_transaction', 'revision_id', array( + 'description' => 'The current {commerce_payment_transaction_revision}.revision_id version identifier.', + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => FALSE, + )); + + return t('Schema for the commerce_payment_transaction has been updated.'); +} diff --git a/modules/product/commerce_product.install b/modules/product/commerce_product.install index de1559f..63e9efb 100644 --- a/modules/product/commerce_product.install +++ b/modules/product/commerce_product.install @@ -21,7 +21,6 @@ function commerce_product_schema() { 'type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, - 'default' => NULL, ), 'sku' => array( 'description' => 'The unique, human-readable identifier for a product.',