You are here

function system_update_158 in Drupal 4

Same name and namespace in other branches
  1. 5 modules/system/system.install \system_update_158()

File

database/updates.inc, line 1112

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(1) 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;
}