You are here

function uc_order_update_2 in Ubercart 5

File

uc_order/uc_order.install, line 262

Code

function uc_order_update_2() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {uc_order_products} CHANGE weight weight FLOAT NOT NULL DEFAULT 0.0");
      break;
    case 'pgsql':
      db_change_column($ret, 'uc_order_products', 'weight', 'weight', 'float', array(
        'not null' => true,
        'default' => 0.0,
      ));
      break;
  }
  return $ret;
}