You are here

function mobile_tools_update_7306 in Mobile Tools 7.3

Implements hook_update_N().

Changing detection field to store name of module only and rename it. Warning, data will be lost.

File

./mobile_tools.install, line 268
Instalation of the mobile_tools module

Code

function mobile_tools_update_7306(&$sandbox) {
  $field = array(
    'type' => 'varchar',
    'description' => 'Module responsible for device detection',
    'default' => '',
    'length' => 255,
    'not null' => FALSE,
  );

  // Create the new field
  db_add_field('mobile_tools_device_group', 'detector', $field);

  // Drop the old field
  db_drop_field('mobile_tools_device_group', 'detection');
}