function uc_recurring_update_6011 in UC Recurring Payments and Subscriptions 7.2
Same name and namespace in other branches
- 6.2 uc_recurring.install \uc_recurring_update_6011()
Move product recurring feature to its own module. Add field to indicate which module handles the recurring fee.
File
- ./
uc_recurring.install, line 510 - Installs the Recurring Fee module.
Code
function uc_recurring_update_6011() {
drupal_install_modules(array(
'uc_recurring_product',
));
db_query('INSERT INTO {uc_recurring_product} SELECT * FROM {uc_recurring_products}');
db_drop_table('uc_recurring_products');
db_add_field('uc_recurring_users', 'module', array(
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
));
db_query("UPDATE {uc_recurring_users} SET module = 'uc_recurring_order' WHERE data LIKE '%uc_recurring_order%'");
db_query("UPDATE {uc_recurring_users} SET module = 'uc_recurring_product' WHERE module = ''");
}