You are here

function uc_quote_update_6000 in Ubercart 6.2

Implements hook_update_N().

File

shipping/uc_quote/uc_quote.install, line 198
Install, update and uninstall functions for the uc_quote module.

Code

function uc_quote_update_6000() {
  $ret = array();
  db_drop_primary_key($ret, 'uc_quote_shipping_types');
  db_change_field($ret, 'uc_quote_shipping_types', 'id', 'id', array(
    'type' => 'int',
    'unsigned' => TRUE,
    'not null' => TRUE,
    'default' => 0,
  ), array(
    'primary key' => array(
      'id_type',
      'id',
    ),
  ));
  db_drop_primary_key($ret, 'uc_quote_manufacturer_locations');
  db_change_field($ret, 'uc_quote_manufacturer_locations', 'tid', 'tid', array(
    'type' => 'int',
    'unsigned' => TRUE,
    'not null' => TRUE,
    'default' => 0,
  ), array(
    'primary key' => array(
      'tid',
    ),
  ));
  db_drop_primary_key($ret, 'uc_quote_product_locations');
  db_change_field($ret, 'uc_quote_product_locations', 'nid', 'nid', array(
    'type' => 'int',
    'unsigned' => TRUE,
    'not null' => TRUE,
    'default' => 0,
  ), array(
    'primary key' => array(
      'nid',
    ),
  ));
  db_drop_unique_key($ret, 'uc_order_quotes', 'oid_quote_method');
  db_change_field($ret, 'uc_order_quotes', 'oid', 'order_id', array(
    'type' => 'int',
    'unsigned' => TRUE,
    'not null' => TRUE,
    'default' => 0,
  ), array(
    'unique keys' => array(
      'order_id_quote_method' => array(
        'order_id',
        'method',
      ),
    ),
  ));
  return $ret;
}