From: Nik Okuntseff Date: Wed, 28 Feb 2018 17:32:38 +0000 (+0000) Subject: Added current db version to dbinstall.php output. X-Git-Tag: timetracker_1.19-1~1076 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=3eff870011f63ebcd0cf13c3aa3696e2502ba791;p=timetracker.git Added current db version to dbinstall.php output. --- diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 642762fa..743d8180 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - - + +
 Anuko Time Tracker 1.17.35.4035 | Copyright © Anuko | +  Anuko Time Tracker 1.17.35.4036 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/dbinstall.php b/dbinstall.php index b755a8bd..43463457 100755 --- a/dbinstall.php +++ b/dbinstall.php @@ -155,6 +155,16 @@ if ($request->isGet()) { } else { echo('There are no tables in database. Execute step 1 - Create database structure.
'); } + + $sql = "select param_value from tt_site_config where param_name = 'version_db'"; + $res = $conn->query($sql); + if (is_a($res, 'MDB2_Error')) { + die('Error: database schema version query failed. '.$res->getMessage().'
'); + } else { + $val = $res->fetchRow(); + echo('Current database version is: '.$val['param_value'].'.'); + } + $conn->disconnect(); } @@ -712,7 +722,7 @@ if ($_POST) { setChange("ALTER TABLE `tt_log` ADD `paid` tinyint(4) NULL default '0' AFTER `billable`"); } - if ($_POST["convert11400to11734"]) { + if ($_POST["convert11400to11735"]) { setChange("ALTER TABLE `tt_teams` DROP `address`"); setChange("ALTER TABLE `tt_fav_reports` ADD `report_spec` text default NULL AFTER `user_id`"); setChange("ALTER TABLE `tt_fav_reports` ADD `paid_status` tinyint(4) default NULL AFTER `invoice`"); @@ -787,7 +797,7 @@ if ($_POST) {

DB Install

-
Create database structure (v1.17.34) + Create database structure (v1.17.35)
(applies only to new installations, do not execute when updating)
@@ -823,8 +833,8 @@ if ($_POST) {

Update database structure (v1.14 to v1.17.34)
Update database structure (v1.14 to v1.17.35)