You are here

function simplenews_update_5001 in Simplenews 5

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

Add index to simplenews_subscriptions

File

./simplenews.install, line 197

Code

function simplenews_update_5001() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {simplenews_newsletters} ADD vid int(10) NOT NULL default '0'");
      break;
    case 'pgsql':
      $ret[] = update_sql("ALTER TABLE {simplenews_newsletters} ADD vid int NOT NULL default '0'");
      break;
  }
  return $ret;
}