Skip to content

Commit

Permalink
feature 3225: add elapsed time on each upgrade
Browse files Browse the repository at this point in the history
git-svn-id: http://piwigo.org/svn/trunk@31183 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
plegall committed May 28, 2015
1 parent 928cf9a commit b5de5c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion install/upgrade_2.6.0.php
Expand Up @@ -105,14 +105,15 @@
// include & execute upgrade script. Each upgrade script must contain
// $upgrade_description variable which describe briefly what the upgrade
// script does.
$up_start = get_moment();
include(UPGRADES_PATH.'/'.$upgrade_id.'-database.php');

// notify upgrade (TODO change on each release)
$query = '
INSERT INTO `'.PREFIX_TABLE.'upgrade`
(id, applied, description)
VALUES
(\''.$upgrade_id.'\', NOW(), \'[migration from 2.6.0 to '.PHPWG_VERSION.'] '.$upgrade_description.'\')
(\''.$upgrade_id.'\', NOW(), \'[migration from 2.6.0 to '.PHPWG_VERSION.', '.get_elapsed_time($up_start, get_moment()).'] '.$upgrade_description.'\')
;';
pwg_query($query);
}
Expand Down

0 comments on commit b5de5c7

Please sign in to comment.