From 8a0ec8135a1bb4f42c0ae89b7d97e3dfd500aba5 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 2 Nov 2018 12:55:44 +0000 Subject: [PATCH] Fixing org_id for existing groups. --- WEB-INF/templates/footer.tpl | 2 +- dbinstall.php | 2 ++ mysql.sql | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 80c89105..74ea3c29 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.18.06.4347 | Copyright © Anuko | +  Anuko Time Tracker 1.18.06.4348 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/dbinstall.php b/dbinstall.php index f6fd0c1b..9e71651e 100644 --- a/dbinstall.php +++ b/dbinstall.php @@ -963,6 +963,8 @@ if ($_POST) { setChange("UPDATE `tt_site_config` SET param_value = '1.18.00', modified = now() where param_name = 'version_db' and param_value = '1.17.97'"); setChange("create index log_idx on tt_custom_field_log(log_id)"); setChange("UPDATE `tt_site_config` SET param_value = '1.18.05', modified = now() where param_name = 'version_db' and param_value = '1.18.00'"); + setChange("update `tt_groups` inner join `tt_site_config` sc on (sc.param_name = 'version_db' and sc.param_value = '1.18.05') set org_id = id where org_id is null"); + setChange("UPDATE `tt_site_config` SET param_value = '1.18.06', modified = now() where param_name = 'version_db' and param_value = '1.18.05'"); } if ($_POST["cleanup"]) { diff --git a/mysql.sql b/mysql.sql index 955f1b29..3c2b786a 100644 --- a/mysql.sql +++ b/mysql.sql @@ -458,4 +458,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.05', now()); # TODO: change when structure changes. +INSERT INTO `tt_site_config` (`param_name`, `param_value`, `created`) VALUES ('version_db', '1.18.06', now()); # TODO: change when structure changes. -- 2.20.1