function subscriptions_update_4 in Subscriptions 6
Same name and namespace in other branches
- 5.2 subscriptions.install \subscriptions_update_4()
Database update function 4 for 5.x-2.0 rewrite.
File
- ./
subscriptions.install, line 296 - Subscriptions module installation.
Code
function subscriptions_update_4() {
$ret = array();
db_add_field($ret, 'subscriptions_user', 'send_interval', array(
'type' => 'int',
'not null' => TRUE,
'default' => -1,
));
db_add_field($ret, 'subscriptions_user', 'send_updates', array(
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => -1,
));
db_add_field($ret, 'subscriptions_user', 'send_comments', array(
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => -1,
));
$ret[] = update_sql("DELETE FROM {subscriptions_user} WHERE uid = 0");
$ret[] = update_sql("UPDATE {subscriptions_user} SET digest = -1");
$ret[] = update_sql("INSERT INTO {subscriptions_user} (uid, digest, send_interval, send_updates, send_comments) VALUES(" . -DRUPAL_AUTHENTICATED_RID . ", 0, 1, 0, 0)");
return $ret;
}