]> wagnertech.de Git - timetracker.git/blobdiff - dbinstall.php
Started to populate org_id on creation of expense items.
[timetracker.git] / dbinstall.php
index e8dc454bdcd6befef0d2db476b5b5044f78d85da..437dac2e92c360272f700996317625c3ead05ef6 100644 (file)
@@ -1005,6 +1005,7 @@ if ($_POST) {
     setChange("UPDATE `tt_predefined_expenses` inner join `tt_site_config` sc on (sc.param_name = 'version_db' and sc.param_value = '1.18.16') set org_id = group_id where org_id is null");
     setChange("ALTER TABLE `tt_expense_items` ADD `org_id` int(11) default NULL AFTER `group_id`");
     setChange("UPDATE `tt_site_config` SET param_value = '1.18.17', modified = now() where param_name = 'version_db' and param_value = '1.18.16'");
+    setChange("UPDATE `tt_expense_items` inner join `tt_site_config` sc on (sc.param_name = 'version_db' and sc.param_value = '1.18.17') set org_id = group_id where org_id is null");
 
     // TODO: this does not work as we just introduced group_id and it is NULL. Same for tt_project_task_binds. Improve.
     // setChange("UPDATE `tt_user_project_binds` inner join `tt_site_config` sc on (sc.param_name = 'version_db' and sc.param_value = '1.18.12') set org_id = group_id where org_id is null");