You are here

function uc_ups_update_2 in Ubercart 5

Same name and namespace in other branches
  1. 6.2 shipping/uc_ups/uc_ups.install \uc_ups_update_2()

File

shipping/uc_ups/uc_ups.install, line 56

Code

function uc_ups_update_2() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {uc_ups_products} ADD COLUMN qty smallint unsigned NOT NULL default '1' AFTER pkg_type");
      break;
    case 'pgsql':
      db_add_column($ret, 'uc_ups_products', 'qty', 'smallint unsigned', array(
        'not null' => true,
        'default' => 1,
      ));
      break;
  }
  return $ret;
}