function uc_product_power_tools_update_2 in Ubercart Product Power Tools 6
Same name and namespace in other branches
- 6.2 uc_product_power_tools.install \uc_product_power_tools_update_2()
File
- ./
uc_product_power_tools.install, line 292 - Install, update, and uninstall functions for the uc_product_power_tools module.
Code
function uc_product_power_tools_update_2() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
$ret[] = update_sql("ALTER TABLE {uc_power_tools} ADD `sp` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER `cost-settings`");
$ret[] = update_sql("ALTER TABLE {uc_power_tools} ADD `sp-settings` DECIMAL(15, 3) NOT NULL DEFAULT '0' AFTER `sp`");
break;
case 'pgsql':
db_add_column($ret, 'uc_power_tools', 'sp', 'smallint unsigned', array(
'not null' => TRUE,
'default' => 0,
));
db_add_column($ret, 'uc_power_tools', 'sp-settings', 'numeric(15, 3)', array(
'not null' => TRUE,
'default' => 0,
));
break;
}
return $ret;
}