function uc_attribute_update_4 in Ubercart 5
File
- uc_attribute/
uc_attribute.install, line 232
Code
function uc_attribute_update_4() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
$ret[] = update_sql("ALTER TABLE {uc_product_adjustments} CHANGE combination combination varchar(255) NOT NULL");
$ret[] = update_sql("ALTER TABLE {uc_product_adjustments} ADD PRIMARY KEY (`nid`, `combination`)");
break;
case 'pgsql':
db_change_column($ret, 'uc_product_adjustments', 'combination', 'combination', 'varchar(255)', array(
'not null' => true,
'default' => "''",
));
$ret[] = update_sql("ALTER TABLE {uc_product_adjustments} ADD PRIMARY KEY (nid, combiination)");
}
return $ret;
}