You are here

function subscriptions_update_5 in Subscriptions 6

Same name and namespace in other branches
  1. 5.2 subscriptions.install \subscriptions_update_5()

Database update function 5 for 5.x-2.0 rewrite.

File

./subscriptions.install, line 312
Subscriptions module installation.

Code

function subscriptions_update_5() {
  $ret = array();
  db_add_field($ret, 'subscriptions_user', 'send_interval_visible', array(
    'type' => 'int',
    'not null' => TRUE,
    'default' => -1,
  ));
  db_add_field($ret, 'subscriptions_user', 'send_updates_visible', array(
    'type' => 'int',
    'size' => 'tiny',
    'not null' => TRUE,
    'default' => -1,
  ));
  db_add_field($ret, 'subscriptions_user', 'send_comments_visible', array(
    'type' => 'int',
    'size' => 'tiny',
    'not null' => TRUE,
    'default' => -1,
  ));
  db_add_field($ret, 'subscriptions_queue', 'is_new', array(
    'type' => 'int',
    'size' => 'tiny',
    'not null' => FALSE,
  ));
  $ret[] = update_sql("UPDATE {subscriptions_user} SET send_interval_visible = 0, send_updates_visible = 0, send_comments_visible = 0 WHERE uid = " . -DRUPAL_AUTHENTICATED_RID);
  return $ret;
}