function uc_quote_update_3 in Ubercart 5
File
- shipping/
uc_quote/ uc_quote.install, line 193
Code
function uc_quote_update_3() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
$ret[] = update_sql("ALTER TABLE {uc_quote_manufacturer_locations} CHANGE COLUMN address1 street1 varchar(255) NOT NULL default ''");
$ret[] = update_sql("ALTER TABLE {uc_quote_manufacturer_locations} CHANGE COLUMN address2 street2 varchar(255) NOT NULL default ''");
$ret[] = update_sql("ALTER TABLE {uc_quote_product_locations} CHANGE COLUMN address1 street1 varchar(255) NOT NULL default ''");
$ret[] = update_sql("ALTER TABLE {uc_quote_product_locations} CHANGE COLUMN address2 street2 varchar(255) NOT NULL default ''");
break;
case 'pgsql':
db_change_column($ret, 'uc_quote_manufacturer_locations', 'address1', 'street1', 'varchar(255)', array(
'not null' => true,
'default' => "''",
));
db_change_column($ret, 'uc_quote_manufacturer_locations', 'address2', 'street2', 'varchar(255)', array(
'not null' => true,
'default' => "''",
));
db_change_column($ret, 'uc_quote_product_locations', 'address1', 'street1', 'varchar(255)', array(
'not null' => true,
'default' => "''",
));
db_change_column($ret, 'uc_quote_product_locations', 'address2', 'street2', 'varchar(255)', array(
'not null' => true,
'default' => "''",
));
break;
}
return $ret;
}