function ad_update_5 in Advertisement 5.2
Same name and namespace in other branches
- 5 ad.install \ad_update_5()
Convert to utf8 character set for all tables to allow for proper internationalization.
File
- ./
ad.install, line 300
Code
function ad_update_5() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'pgsql':
// Not sure if anything needs to be done for utf8 support in PostgreSQL.
break;
default:
$tables = array(
'ads',
'ad_clicks',
'ad_hosts',
'ad_owners',
'ad_permissions',
'ad_statistics',
);
foreach ($tables as $table) {
$ret[] = update_sql('ALTER TABLE {' . $table . '} CONVERT TO CHARACTER SET utf8');
}
}
return $ret;
}