X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/bf5ddc4f34213ffe75d6d601c16148a3fe506455..7c2e78a2e46063bdec7ec4867680762b629cf4e2:/dbinstall.php diff --git a/dbinstall.php b/dbinstall.php index dd360115..491330f2 100755 --- a/dbinstall.php +++ b/dbinstall.php @@ -61,7 +61,7 @@ if ($request->isGet()) { // spit white space before output in some situations such as in PDF reports. $file = fopen(APP_DIR.'/WEB-INF/config.php', 'r'); $line = fgets($file); - if (strcmp('Error: WEB-INF/config.php file does not start with PHP opening tag.
'); } fclose($file); @@ -709,7 +709,7 @@ if ($_POST) { setChange("ALTER TABLE `tt_log` ADD `paid` tinyint(4) NULL default '0' AFTER `billable`"); } - if ($_POST["convert11400to11715"]) { + if ($_POST["convert11400to11728"]) { setChange("ALTER TABLE `tt_teams` DROP `address`"); setChange("ALTER TABLE `tt_fav_reports` ADD `report_spec` text default NULL AFTER `user_id`"); setChange("ALTER TABLE `tt_fav_reports` ADD `paid_status` tinyint(4) default NULL AFTER `invoice`"); @@ -724,6 +724,13 @@ if ($_POST) { setChange("ALTER TABLE `tt_teams` DROP `workday_hours`"); setChange("UPDATE `tt_monthly_quotas` SET `minutes` = 60 * `quota`"); setChange("ALTER TABLE `tt_monthly_quotas` DROP `quota`"); + setChange("ALTER TABLE `tt_teams` DROP `uncompleted_indicators`"); + setChange("ALTER TABLE `tt_users` MODIFY `timestamp` timestamp default CURRENT_TIMESTAMP"); + setChange("ALTER TABLE `tt_teams` MODIFY `timestamp` timestamp default CURRENT_TIMESTAMP"); + setChange("ALTER TABLE `tt_log` MODIFY `timestamp` timestamp default CURRENT_TIMESTAMP"); + setChange("ALTER TABLE `tt_tmp_refs` MODIFY `timestamp` timestamp default CURRENT_TIMESTAMP"); + setChange("CREATE TABLE `tt_roles` (`id` int(11) NOT NULL auto_increment, `team_id` int(11) NOT NULL, `name` varchar(80) default NULL, `rank` int(11) default 0, `rights` text default NULL, `status` tinyint(4) default 1, PRIMARY KEY (`id`))"); + setChange("create unique index role_idx on tt_roles(team_id, rank, status)"); } if ($_POST["cleanup"]) { @@ -756,6 +763,7 @@ if ($_POST) { setChange("OPTIMIZE TABLE tt_tmp_refs"); setChange("OPTIMIZE TABLE tt_user_project_binds"); setChange("OPTIMIZE TABLE tt_users"); + setChange("OPTIMIZE TABLE tt_roles"); } print "done.
\n"; @@ -768,7 +776,7 @@ if ($_POST) {

DB Install

-
Create database structure (v1.17.15) + Create database structure (v1.17.28)
(applies only to new installations, do not execute when updating)
@@ -804,8 +812,8 @@ if ($_POST) {
- Update database structure (v1.14 to v1.17.15) -
+ Update database structure (v1.14 to v1.17.28) +