You are here

function job_scheduler_update_7100 in Job Scheduler 7.2

Same name and namespace in other branches
  1. 7 job_scheduler.install \job_scheduler_update_7100()

Rename 'callback' to 'name' field.

File

./job_scheduler.install, line 137
Schema definitions install/update/uninstall hooks.

Code

function job_scheduler_update_7100() {
  db_drop_index('job_schedule', 'callback_type_id');
  db_drop_index('job_schedule', 'callback_type');
  $spec = array(
    'type' => 'varchar',
    'length' => 128,
    'not null' => TRUE,
    'default' => '',
    'description' => 'Name of the schedule.',
  );
  db_change_field('job_schedule', 'callback', 'name', $spec);
  db_add_index('job_schedule', 'name_type_id', array(
    'name',
    'type',
    'id',
  ));
  db_add_index('job_schedule', 'name_type', array(
    'name',
    'type',
  ));
}