function system_update_123 in Drupal 4
Same name and namespace in other branches
- 5 modules/system/system.install \system_update_123()
File
- database/
updates.inc, line 320
Code
function system_update_123() {
$ret = array();
if ($GLOBALS['db_type'] == 'mysql') {
$ret[] = update_sql("ALTER TABLE {vocabulary} ADD module varchar(255) NOT NULL default ''");
}
elseif ($GLOBALS['db_type'] == 'pgsql') {
$ret[] = update_sql("ALTER TABLE {vocabulary} ADD module varchar(255)");
$ret[] = update_sql("UPDATE {vocabulary} SET module = ''");
$ret[] = update_sql("ALTER TABLE {vocabulary} ALTER COLUMN module SET NOT NULL");
$ret[] = update_sql("ALTER TABLE {vocabulary} ALTER COLUMN module SET DEFAULT ''");
}
$ret[] = update_sql("UPDATE {vocabulary} SET module = 'taxonomy'");
$vid = variable_get('forum_nav_vocabulary', '');
if (!empty($vid)) {
$ret[] = update_sql("UPDATE {vocabulary} SET module = 'forum' WHERE vid = " . $vid);
}
return $ret;
}