function optimizely_update_7300 in Optimizely 7.3
Add the role column to the database table for the Optimizely module to support applying the Optimizely snippet to pages by user role.
File
- ./
optimizely.install, line 274 - Install, update and uninstall functions for the Optimizely module
Code
function optimizely_update_7300(&$sandbox) {
// Add roles field to optimizely table
$new_field = array(
'type' => 'varchar',
'description' => 'Filter project display by user role. Contains selected serialized list of roles.',
'length' => 512,
'not null' => FALSE,
'default' => '',
);
db_add_field('optimizely', 'roles', $new_field);
// Inform the user of the update
drupal_set_message(st('The roles column has been added to the Optimizely database table.'), 'status');
}