function system_update_123 in Drupal 5
Same name and namespace in other branches
- 4 database/updates.inc \system_update_123()
File
- modules/
system/ system.install, line 1430
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;
}