function system_update_158 in Drupal 5
Same name and namespace in other branches
- 4 database/updates.inc \system_update_158()
File
- modules/
system/ system.install, line 2222
Code
function system_update_158() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'mysqli':
case 'mysql':
$ret[] = update_sql("ALTER TABLE {old_revisions} ADD done tinyint NOT NULL DEFAULT 0");
$ret[] = update_sql("ALTER TABLE {old_revisions} ADD INDEX (done)");
break;
case 'pgsql':
db_add_column($ret, 'old_revisions', 'done', 'smallint', array(
'not null' => TRUE,
'default' => 0,
));
$ret[] = update_sql('CREATE INDEX {old_revisions}_done_idx ON {old_revisions}(done)');
break;
}
return $ret;
}