aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2015-05-28 13:10:31 +0000
committerplegall <plg@piwigo.org>2015-05-28 13:10:31 +0000
commitb5de5c7658109d26af0fbcd46550bf6de2e515e6 (patch)
tree0fae99a3dfa8ecfcbe686b17ee2120f6592aa2b5
parent928cf9ade941754a99c03e8baf4b77ae4cc05d66 (diff)
feature 3225: add elapsed time on each upgrade
git-svn-id: http://piwigo.org/svn/trunk@31183 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--install/upgrade_2.6.0.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/install/upgrade_2.6.0.php b/install/upgrade_2.6.0.php
index 90f13c037..3a43e7cb3 100644
--- a/install/upgrade_2.6.0.php
+++ b/install/upgrade_2.6.0.php
@@ -105,6 +105,7 @@ for ($upgrade_id = 140; $upgrade_id <= 144; $upgrade_id++) // TODO change on eac
// 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)
@@ -112,7 +113,7 @@ for ($upgrade_id = 140; $upgrade_id <= 144; $upgrade_id++) // TODO change on eac
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);
}