function ad_update_8 in Advertisement 5.2
Same name and namespace in other branches
- 5 ad.install \ad_update_8()
Introduce "status" for remote hosts, allowing them to be disabled.
File
- ./
ad.install, line 352
Code
function ad_update_8() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
$ret[] = update_sql("ALTER TABLE {ad_hosts} ADD status INT NOT NULL DEFAULT '0' AFTER hostid");
break;
case 'pgsql':
db_add_column($ret, 'ad_hosts', 'status', 'int', array(
'not null' => TRUE,
'default' => "'0'",
));
break;
}
return $ret;
}