mirror of
https://github.com/itflow-org/itflow
synced 2026-11-26 06:17:27 +00:00
Make Maintenance > Update easier to follow - it opens with where the install stands (up to date, an update available, updating, the database still to finish, checking) and the one button for it, Update ITFlow in place of Queue Update, with what's new below it (the release notes between this install and the latest, read from the changelog by the update check, developer notes and commits folded away), what to do first including the ITFlow files changed on this install that updating would put back, the update shown running with the page refreshing itself and then when it finished or what stopped it, and this install's version, branch, database, commit, last check, last update, cron and the command to update from a shell alongside; database 3.5.7 adds settings.config_update_details, written by cron/update_check.php through the new updateCheckDetails(), updateChangelogSections() and updateChangelogHtml() render the release notes escaped, cron/app_update.php asks for a fresh check after an update, changelog updated
This commit is contained in:
24
admin/database_updates/3.5.7.php
Normal file
24
admin/database_updates/3.5.7.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* ITFlow - Database update to version 3.5.7 (from 3.5.6)
|
||||
* Included by admin/database_updates.php - do not access directly
|
||||
*
|
||||
* settings.config_update_details - what the update check found besides the commits, as JSON:
|
||||
* the version the update brings, the changelog between this install and it, and the files
|
||||
* this install has changed that updating would put back. Written by cron/update_check.php,
|
||||
* read by Maintenance > Update.
|
||||
*
|
||||
* Re-runnable: skipped where the column is already there.
|
||||
*/
|
||||
|
||||
defined('FROM_DB_UPDATER') || die("Direct file access is not allowed");
|
||||
|
||||
$itflow_column_exists = mysqli_query($mysqli, "SELECT 1 FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'settings' AND COLUMN_NAME = 'config_update_details' LIMIT 1");
|
||||
|
||||
if (!$itflow_column_exists || mysqli_num_rows($itflow_column_exists) === 0) {
|
||||
mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_update_details` MEDIUMTEXT DEFAULT NULL AFTER `config_update_checked_at`");
|
||||
}
|
||||
|
||||
unset($itflow_column_exists);
|
||||
Reference in New Issue
Block a user