X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/07ee49d8208cc8308a167487f010e4b919555e03..2352b1096ea3b8301f06d3e5b072022ae08a2f73:/dbinstall.php
diff --git a/dbinstall.php b/dbinstall.php
index 8b7e8c5e..e8dc454b 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["convert11797to11816"]) {
+ if ($_POST["convert11797to11817"]) {
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`");
@@ -1003,6 +1003,8 @@ if ($_POST) {
setChange("ALTER TABLE `tt_predefined_expenses` ADD `org_id` int(11) default NULL AFTER `group_id`");
setChange("UPDATE `tt_site_config` SET param_value = '1.18.16', modified = now() where param_name = 'version_db' and param_value = '1.18.15'");
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'");
// 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");
@@ -1031,6 +1033,7 @@ if ($_POST) {
setChange("OPTIMIZE TABLE tt_invoices");
setChange("OPTIMIZE TABLE tt_log");
setChange("OPTIMIZE TABLE tt_monthly_quotas");
+ setChange("OPTIMIZE TABLE tt_predefined_expenses");
setChange("OPTIMIZE TABLE tt_project_task_binds");
setChange("OPTIMIZE TABLE tt_projects");
setChange("OPTIMIZE TABLE tt_tasks");
@@ -1051,7 +1054,7 @@ if ($_POST) {
Create database structure (v1.18.16) + | Create database structure (v1.18.17)
(applies only to new installations, do not execute when updating) |