function uc_shipping_update_6000 in Ubercart 6.2
File
- shipping/
uc_shipping/ uc_shipping.install, line 358 - Install hooks for uc_shipping.module.
Code
function uc_shipping_update_6000() {
$ret = array();
db_drop_primary_key($ret, 'uc_shipments');
db_change_field($ret, 'uc_shipments', 'sid', 'sid', array(
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
), array(
'primary key' => array(
'sid',
),
));
db_change_field($ret, 'uc_shipments', 'order_id', 'order_id', array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
));
db_drop_primary_key($ret, 'uc_packages');
db_change_field($ret, 'uc_packages', 'package_id', 'package_id', array(
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
), array(
'primary key' => array(
'package_id',
),
));
db_change_field($ret, 'uc_packages', 'order_id', 'order_id', array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
));
db_change_field($ret, 'uc_packages', 'value', 'value', array(
'type' => 'numeric',
'precision' => 10,
'scale' => 2,
'unsigned' => TRUE,
'not null' => FALSE,
));
db_change_field($ret, 'uc_packages', 'sid', 'sid', array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => FALSE,
));
db_drop_primary_key($ret, 'uc_packaged_products');
db_change_field($ret, 'uc_packaged_products', 'package_id', 'package_id', array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
));
db_change_field($ret, 'uc_packaged_products', 'order_product_id', 'order_product_id', array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
));
db_add_primary_key($ret, 'uc_packaged_products', array(
'package_id',
'order_product_id',
));
return $ret;
}