You are here

function ultimate_cron_update_7205 in Ultimate Cron 7.2

Fix column sizes to fix index sizes.

File

./ultimate_cron.install, line 1056
Installation file for Ultimate Cron.

Code

function ultimate_cron_update_7205() {
  db_change_field('ultimate_cron_job', 'name', 'name', array(
    'description' => 'Name',
    'type' => 'varchar',
    'length' => 150,
    'not null' => TRUE,
  ));
  db_change_field('ultimate_cron_log', 'name', 'name', array(
    'description' => 'Name',
    'type' => 'varchar',
    'length' => 150,
    'not null' => TRUE,
  ));
  db_change_field('ultimate_cron_lock', 'name', 'name', array(
    'description' => 'Name',
    'type' => 'varchar',
    'length' => 150,
    'not null' => TRUE,
  ));
  db_change_field('ultimate_cron_signal', 'job_name', 'job_name', array(
    'description' => 'Name of job',
    'type' => 'varchar',
    'length' => 150,
    'not null' => TRUE,
  ));
  db_change_field('ultimate_cron_signal', 'signal_name', 'signal_name', array(
    'description' => 'Name of signal',
    'type' => 'varchar',
    'length' => 150,
    'not null' => TRUE,
  ));
  db_drop_index('ultimate_cron_log', 'idx_last');
  db_add_index('ultimate_cron_log', 'idx_last', array(
    'name',
    'start_time',
    'end_time',
    'log_type',
  ));
  db_drop_unique_key('ultimate_cron_lock', 'idx_name');
  db_add_unique_key('ultimate_cron_lock', 'idx_name', array(
    'name',
    'current',
  ));
  db_drop_primary_key('ultimate_cron_signal');
  db_add_primary_key('ultimate_cron_signal', array(
    'job_name',
    'signal_name',
  ));
}