You are here

function uc_product_update_5 in Ubercart 5

File

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

Code

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