function system_update_162 in Drupal 4
Same name and namespace in other branches
- 5 modules/system/system.install \system_update_162()
File
- database/
updates.inc, line 1260
Code
function system_update_162() {
$ret = array();
// PostgreSQL only update
switch ($GLOBALS['db_type']) {
case 'pgsql':
$ret[] = update_sql('DROP INDEX {book}_parent');
$ret[] = update_sql('CREATE INDEX {book}_parent_idx ON {book}(parent)');
$ret[] = update_sql('DROP INDEX {node_comment_statistics}_timestamp_idx');
$ret[] = update_sql('CREATE INDEX {node_comment_statistics}_last_comment_timestamp_idx ON {node_comment_statistics}(last_comment_timestamp)');
$ret[] = update_sql('ALTER TABLE {filters} ALTER delta SET DEFAULT 0');
$ret[] = update_sql('DROP INDEX {filters}_module_idx');
$ret[] = update_sql('DROP INDEX {locales_target}_lid_idx');
$ret[] = update_sql('DROP INDEX {locales_target}_lang_idx');
$ret[] = update_sql('CREATE INDEX {locales_target}_locale_idx ON {locales_target}(locale)');
$ret[] = update_sql('DROP INDEX {node}_created');
$ret[] = update_sql('CREATE INDEX {node}_created_idx ON {node}(created)');
$ret[] = update_sql('DROP INDEX {node}_changed');
$ret[] = update_sql('CREATE INDEX {node}_changed_idx ON {node}(changed)');
$ret[] = update_sql('DROP INDEX {profile_fields}_category');
$ret[] = update_sql('CREATE INDEX {profile_fields}_category_idx ON {profile_fields}(category)');
$ret[] = update_sql('DROP INDEX {url_alias}_dst_idx');
$ret[] = update_sql('CREATE UNIQUE INDEX {url_alias}_dst_idx ON {url_alias}(dst)');
$ret[] = update_sql('CREATE INDEX {sessions}_uid_idx ON {sessions}(uid)');
$ret[] = update_sql('CREATE INDEX {sessions}_timestamp_idx ON {sessions}(timestamp)');
$ret[] = update_sql('ALTER TABLE {accesslog} DROP mask');
db_change_column($ret, 'accesslog', 'path', 'path', 'text');
db_change_column($ret, 'accesslog', 'url', 'url', 'text');
db_change_column($ret, 'watchdog', 'link', 'link', 'text', array(
'not null' => TRUE,
'default' => "''",
));
db_change_column($ret, 'watchdog', 'location', 'location', 'text', array(
'not null' => TRUE,
'default' => "''",
));
db_change_column($ret, 'watchdog', 'referer', 'referer', 'text', array(
'not null' => TRUE,
'default' => "''",
));
break;
}
return $ret;
}