From: Nik Okuntseff Date: Mon, 19 Nov 2018 18:14:05 +0000 (+0000) Subject: Added group_id and org_id to tt_config table. X-Git-Tag: timetracker_1.19-1~608 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=abc243a67d158977ad2400ae4c41c447448473b5;p=timetracker.git Added group_id and org_id to tt_config table. --- diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 627f0acc..3315253f 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - - + +
 Anuko Time Tracker 1.18.21.4463 | Copyright © Anuko | +  Anuko Time Tracker 1.18.22.4464 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/dbinstall.php b/dbinstall.php index 60244914..5ee0337e 100644 --- a/dbinstall.php +++ b/dbinstall.php @@ -957,7 +957,7 @@ if ($_POST) { print "Updated $tt_expense_items_updated tt_expense_items records...
\n"; } - if ($_POST["convert11797to11821"]) { + if ($_POST["convert11797to11822"]) { setChange("ALTER TABLE `tt_fav_reports` CHANGE `group_by` `group_by1` varchar(20) default NULL"); setChange("ALTER TABLE `tt_fav_reports` ADD `group_by2` varchar(20) default NULL AFTER `group_by1`"); setChange("ALTER TABLE `tt_fav_reports` ADD `group_by3` varchar(20) default NULL AFTER `group_by2`"); @@ -1022,6 +1022,9 @@ if ($_POST) { setChange("update `tt_client_project_binds` cpb inner join `tt_site_config` sc on (sc.param_name = 'version_db' and sc.param_value = '1.18.20') inner join `tt_clients` c on c.id = cpb.client_id set cpb.group_id = c.group_id, cpb.org_id = c.org_id where cpb.org_id is null"); setChange("UPDATE `tt_site_config` SET param_value = '1.18.21', modified = now() where param_name = 'version_db' and param_value = '1.18.20'"); setChange("create unique index client_project_idx on tt_client_project_binds(client_id, project_id)"); + setChange("ALTER TABLE `tt_config` ADD `group_id` int(11) default NULL AFTER `user_id`"); + setChange("ALTER TABLE `tt_config` ADD `org_id` int(11) default NULL AFTER `group_id`"); + setChange("UPDATE `tt_site_config` SET param_value = '1.18.22', modified = now() where param_name = 'version_db' and param_value = '1.18.21'"); } if ($_POST["cleanup"]) { @@ -1069,7 +1072,7 @@ if ($_POST) {

DB Install

-
Create database structure (v1.18.21) + Create database structure (v1.18.22)
(applies only to new installations, do not execute when updating)
@@ -1114,8 +1117,8 @@ if ($_POST) {
Update database structure (v1.17.97 to v1.18.21)Update database structure (v1.17.97 to v1.18.22)
diff --git a/mysql.sql b/mysql.sql index bc970f73..e0c4145d 100644 --- a/mysql.sql +++ b/mysql.sql @@ -351,6 +351,8 @@ create unique index client_project_idx on tt_client_project_binds(client_id, pro # CREATE TABLE `tt_config` ( `user_id` int(11) NOT NULL, # user id + `group_id` int(11) default NULL, # group id + `org_id` int(11) default NULL, # organization id `param_name` varchar(32) NOT NULL, # parameter name `param_value` varchar(80) default NULL # parameter value ); @@ -479,4 +481,4 @@ CREATE TABLE `tt_site_config` ( PRIMARY KEY (`param_name`) ); -INSERT INTO `tt_site_config` (`param_name`, `param_value`, `created`) VALUES ('version_db', '1.18.21', now()); # TODO: change when structure changes. +INSERT INTO `tt_site_config` (`param_name`, `param_value`, `created`) VALUES ('version_db', '1.18.22', now()); # TODO: change when structure changes.