You are here

function uc_cart_update_6000 in Ubercart 6.2

Standardize database definitions during upgrade to Drupal 6.

ID fields are unsigned, regular-sized ints. "Boolean" flags are unsigned tiny ints. Postgres tables will have the necessary default values, and MySQL doesn't need them, so the schema can just be mismatched for that.

File

uc_cart/uc_cart.install, line 104
Install hooks for uc_cart.module.

Code

function uc_cart_update_6000() {
  $ret = array();
  db_change_field($ret, 'uc_cart_products', 'nid', 'nid', array(
    'type' => 'int',
    'unsigned' => TRUE,
    'not null' => TRUE,
    'default' => 0,
  ));
  db_change_field($ret, 'uc_cart_products', 'qty', 'qty', array(
    'type' => 'int',
    'unsigned' => TRUE,
    'size' => 'small',
    'not null' => TRUE,
    'default' => 0,
  ));
  return $ret;
}