You are here

function uc_product_update_3 in Ubercart 5

File

uc_product/uc_product.install, line 149
Database installation, uninstallation, and updates for the product module.

Code

function uc_product_update_3() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {uc_products} ADD COLUMN units varchar(255) NOT NULL default 'lbs' AFTER weight");
      break;
    case 'pgsql':
      db_add_column($ret, 'uc_products', 'units', 'varchar(255)', array(
        'not null' => true,
        'default' => 'lbs',
      ));
      break;
  }
  return $ret;
}