function system_update_1022 in Drupal 5
Same name and namespace in other branches
- 6 modules/system/system.install \system_update_1022()
Add index on users created column.
Related topics
File
- modules/
system/ system.install, line 3518
Code
function system_update_1022() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
$ret[] = update_sql('ALTER TABLE {users} ADD KEY created (created)');
break;
case 'pgsql':
$ret[] = update_sql("CREATE INDEX {users}_created_idx ON {users} (created)");
break;
}
// Also appears as system_update_2004(). Ensure we don't update twice.
variable_set('system_update_1022', TRUE);
return $ret;
}