You are here

function simplenews_update_2 in Simplenews 5

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

Rename sn_* tables to simplenews_* to avoid namespace conflicts.

File

./simplenews.install, line 163

Code

function simplenews_update_2() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
    case 'pgsql':
      $ret[] = update_sql('ALTER TABLE {sn_snid_tid} RENAME TO {simplenews_snid_tid}');
      $ret[] = update_sql('ALTER TABLE {sn_newsletters} RENAME TO {simplenews_newsletters}');
      $ret[] = update_sql('ALTER TABLE {sn_subscriptions} RENAME TO {simplenews_subscriptions}');
      break;
  }
  return $ret;
}