function ultimate_cron_update_7106 in Ultimate Cron 7.2
Same name and namespace in other branches
- 7 ultimate_cron.install \ultimate_cron_update_7106()
Change schema to SQL 99 compliance.
File
- ./
ultimate_cron.install, line 545 - Installation file for Ultimate Cron.
Code
function ultimate_cron_update_7106() {
// Check each change in case it was previously run when this udpate was
// called ultimate_cron_update_6106().
if (db_index_exists('ultimate_cron', 'idx_function')) {
db_drop_unique_key('ultimate_cron', 'idx_function');
}
if (db_field_exists('ultimate_cron', 'function')) {
db_change_field('ultimate_cron', 'function', 'name', array(
'description' => 'Function name',
'type' => 'varchar',
'length' => 127,
'not null' => TRUE,
'default' => '',
));
}
if (!db_index_exists('ultimate_cron', 'idx_name')) {
db_add_unique_key('ultimate_cron', 'idx_name', array(
'name',
));
}
if (db_field_exists('ultimate_cron_log', 'function')) {
db_change_field('ultimate_cron_log', 'function', 'name', array(
'description' => 'Function name',
'type' => 'varchar',
'length' => 127,
'not null' => TRUE,
'default' => '',
));
}
if (db_field_exists('ultimate_cron_log', 'start')) {
db_change_field('ultimate_cron_log', 'start', 'start_stamp', array(
'description' => 'Timstamp of execution start',
'type' => 'float',
'size' => 'big',
'not null' => TRUE,
'default' => 0,
));
}
if (db_field_exists('ultimate_cron_log', 'end')) {
db_change_field('ultimate_cron_log', 'end', 'end_stamp', array(
'description' => 'Timstamp of execution end',
'type' => 'float',
'size' => 'big',
'not null' => TRUE,
'default' => 0,
));
}
if (db_field_exists('ultimate_cron_log', 'status')) {
db_change_field('ultimate_cron_log', 'status', 'exec_status', array(
'description' => 'Status of the execution',
'type' => 'int',
'size' => 'normal',
'not null' => FALSE,
'default' => NULL,
));
}
}