function subscriptions_update_1 in Subscriptions 6
Same name and namespace in other branches
- 5.2 subscriptions.install \subscriptions_update_1()
Database update function 1 for first incarnation of 5.x-2.0.
File
- ./
subscriptions.install, line 162 - Subscriptions module installation.
Code
function subscriptions_update_1() {
$schema['subscriptions_mail_edit'] = array(
'fields' => array(
'mailkey' => array(
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
),
'item_body' => array(
'type' => 'text',
'not null' => FALSE,
),
),
'primary key' => array(
'mailkey',
),
);
db_create_table($ret, 'subscriptions_mail_edit', $schema['subscriptions_mail_edit']);
db_add_field($ret, 'subscriptions', 'send_interval', array(
'type' => 'int',
'not null' => FALSE,
));
if (variable_get('subscriptions_usecron', 0)) {
$ret[] = update_sql("UPDATE {subscriptions} SET send_interval = 1");
}
variable_del('subscriptions_usecron');
return $ret;
}