Files
itflow/admin/database_updates/4.4.2.php

22 lines
1.1 KiB
PHP

<?php
/*
* ITFlow - Database update to version 4.4.2 (from 4.4.1)
* Included by admin/database_updates.php - do not access directly
*
* cron_jobs.cron_job_outside_at - when the job was last found run by something other than cron.php: a crontab
* line from before 26.08 that runs its script on its own. Such a run steps aside while cron.php is running, or
* holds the job's lock when it isn't, and the dispatcher records it here (cron/cron.php, cron/includes/cron_lock.php);
* Maintenance > Cron and Cron Watch say so (functions/cron_health.php).
*
* Re-runnable: the column is made only where it isn't there.
*/
defined('FROM_DB_UPDATER') || die("Direct file access is not allowed");
$itflow_cron_outside = mysqli_query($mysqli, "SELECT 1 FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'cron_jobs' AND COLUMN_NAME = 'cron_job_outside_at' LIMIT 1");
if (!$itflow_cron_outside || mysqli_num_rows($itflow_cron_outside) === 0) {
mysqli_query($mysqli, "ALTER TABLE `cron_jobs` ADD `cron_job_outside_at` datetime DEFAULT NULL AFTER `cron_job_last_error_at`");
}