From: Nik Okuntseff Date: Sun, 18 Nov 2018 22:30:56 +0000 (+0000) Subject: Added group_id and org_id to tt_fav_reports table. X-Git-Tag: timetracker_1.19-1~618 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=3510da81df216bb117f197dc69366fc564902754;p=timetracker.git Added group_id and org_id to tt_fav_reports table. --- diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 417439b1..f7d31bb2 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - - + +
 Anuko Time Tracker 1.18.18.4453 | Copyright © Anuko | +  Anuko Time Tracker 1.18.19.4454 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/dbinstall.php b/dbinstall.php index 3dfcb931..7dda4213 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["convert11797to11818"]) { + if ($_POST["convert11797to11819"]) { 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`"); @@ -1010,6 +1010,9 @@ if ($_POST) { setChange("update `tt_project_task_binds` ptb inner join tt_site_config sc on (sc.param_name = 'version_db' and sc.param_value = '1.18.17') inner join `tt_projects` p on p.id = ptb.project_id set ptb.group_id = p.group_id, ptb.org_id = p.org_id where ptb.org_id is null"); setChange("create unique index project_task_idx on tt_project_task_binds(project_id, task_id)"); setChange("UPDATE `tt_site_config` SET param_value = '1.18.18', modified = now() where param_name = 'version_db' and param_value = '1.18.17'"); + setChange("ALTER TABLE `tt_fav_reports` ADD `group_id` int(11) default NULL AFTER `user_id`"); + setChange("ALTER TABLE `tt_fav_reports` ADD `org_id` int(11) default NULL AFTER `group_id`"); + setChange("UPDATE `tt_site_config` SET param_value = '1.18.19', modified = now() where param_name = 'version_db' and param_value = '1.18.18'"); } if ($_POST["cleanup"]) { @@ -1056,7 +1059,7 @@ if ($_POST) {

DB Install

-
Create database structure (v1.18.18) + Create database structure (v1.18.19)
(applies only to new installations, do not execute when updating)
@@ -1101,8 +1104,8 @@ if ($_POST) {
Update database structure (v1.17.97 to v1.18.18)Update database structure (v1.17.97 to v1.18.19)
diff --git a/mysql.sql b/mysql.sql index 692a8d25..d5dbe410 100644 --- a/mysql.sql +++ b/mysql.sql @@ -254,6 +254,8 @@ CREATE TABLE `tt_fav_reports` ( `id` int(11) NOT NULL auto_increment, # favorite report id `name` varchar(200) NOT NULL, # favorite report name `user_id` int(11) NOT NULL, # user id favorite report belongs to + `group_id` int(11) default NULL, # group id + `org_id` int(11) default NULL, # organization id `report_spec` text default NULL, # future replacement field for all report settings `client_id` int(11) default NULL, # client id (if selected) `cf_1_option_id` int(11) default NULL, # custom field 1 option id (if selected) @@ -473,4 +475,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.18', now()); # TODO: change when structure changes. +INSERT INTO `tt_site_config` (`param_name`, `param_value`, `created`) VALUES ('version_db', '1.18.19', now()); # TODO: change when structure changes.