function system_update_170 in Drupal 4
Same name and namespace in other branches
- 5 modules/system/system.install \system_update_170()
File
- database/
updates.inc, line 1536
Code
function system_update_170() {
if (!variable_get('update_170_done', false)) {
switch ($GLOBALS['db_type']) {
case 'pgsql':
$ret = array();
db_change_column($ret, 'system', 'schema_version', 'schema_version', 'smallint', array(
'not null' => TRUE,
'default' => -1,
));
break;
case 'mysql':
case 'mysqli':
db_query('ALTER TABLE {system} CHANGE schema_version schema_version smallint(3) not null default -1');
break;
}
// Set schema version -1 (uninstalled) for disabled modules (only affects contrib).
db_query('UPDATE {system} SET schema_version = -1 WHERE status = 0 AND schema_version = 0');
}
return array();
}