]> wagnertech.de Git - timetracker.git/blobdiff - dbinstall.php
Populating group_id and org_id in tt_client_project_binds.
[timetracker.git] / dbinstall.php
index 63bfdc0bdd05dba7c2d50b9cf621e74b9eee3c2e..bfbb5c2c181a4124840d138834d09d45c6b636e2 100644 (file)
@@ -1019,6 +1019,8 @@ if ($_POST) {
     setChange("UPDATE `tt_cron` inner join `tt_site_config` sc on (sc.param_name = 'version_db' and sc.param_value = '1.18.20') set org_id = group_id where org_id is null");
     setChange("ALTER TABLE `tt_client_project_binds` ADD `group_id` int(11) default NULL AFTER `project_id`");
     setChange("ALTER TABLE `tt_client_project_binds` ADD `org_id` int(11) default NULL AFTER `group_id`");
+    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'");
   }
 
   if ($_POST["cleanup"]) {