function payment_update_7107 in Payment 7
Make payment_method.controller_data persistent.
File
- ./
payment.install, line 464 - Installation and uninstallation functions.
Code
function payment_update_7107() {
if (db_field_exists('payment_method', 'controller_data')) {
return;
}
db_add_field('payment_method', 'controller_data', array(
'description' => 'Serialized controller data',
'type' => 'text',
'serialize' => TRUE,
));
db_update('payment_method')
->fields(array(
'controller_data' => serialize(array()),
))
->isNull('controller_data')
->execute();
db_change_field('payment_method', 'controller_data', 'controller_data', array(
'description' => 'Serialized controller data',
'type' => 'text',
'serialize' => TRUE,
'not null' => TRUE,
));
}