function uc_recurring_update_1 in UC Recurring Payments and Subscriptions 6.2
Same name and namespace in other branches
- 6 uc_recurring.install \uc_recurring_update_1()
- 7.2 uc_recurring.install \uc_recurring_update_1()
File
- ./
uc_recurring.install, line 251 - Installs the Recurring Fee module.
Code
function uc_recurring_update_1() {
$ret = array();
$fee_schema = array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
);
// Add a column to store the recurring fee handler with the user subscription.
db_add_field($ret, 'uc_recurring_users', 'fee_handler', $fee_schema);
// Update existing rows if uc_recurring is the current handler.
if (variable_get('uc_recurring_handler', 'uc_recurring') == 'uc_recurring') {
$ret[] = update_sql("UPDATE {uc_recurring_users} SET fee_handler = 'uc_recurring'");
}
return $ret;
}