You are here

function simplenews_update_5000 in Simplenews 5

Same name and namespace in other branches
  1. 6.2 simplenews.install \simplenews_update_5000()
  2. 6 simplenews.install \simplenews_update_5000()

Add index to simplenews_subscriptions

File

./simplenews.install, line 180

Code

function simplenews_update_5000() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {simplenews_subscriptions} ADD INDEX mail (mail);");
      break;
    case 'pgsql':
      $ret[] = update_sql('CREATE INDEX {simplenews_subscriptions}_mail_idx ON {simplenews_subscriptions} (mail)');
      break;
  }
  return $ret;
}