system_update_136
modules/system/system.install, строка 1654
- Версии
- 5
system_update_136()
Код
<?php
function system_update_136() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'pgsql':
$ret[] = update_sql("DROP INDEX {users}_changed_idx"); // We drop the index first because it won't be renamed
$ret[] = update_sql("ALTER TABLE {users} RENAME changed TO access");
$ret[] = update_sql("CREATE INDEX {users}_access_idx on {users}(access)"); // Re-add the index
break;
case 'mysql':
case 'mysqli':
$ret[] = update_sql("ALTER TABLE {users} CHANGE COLUMN changed access int NOT NULL default '0'");
break;
}
$ret[] = update_sql('UPDATE {users} SET access = login WHERE login > created');
$ret[] = update_sql('UPDATE {users} SET access = created WHERE access = 0');
return $ret;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии