X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/2e02b27f8c392d5a2f446f7b51982175e9bf32c4..7c2e78a2e46063bdec7ec4867680762b629cf4e2:/dbinstall.php?ds=sidebyside
diff --git a/dbinstall.php b/dbinstall.php
index 5c02031f..491330f2 100755
--- a/dbinstall.php
+++ b/dbinstall.php
@@ -709,7 +709,7 @@ if ($_POST) {
setChange("ALTER TABLE `tt_log` ADD `paid` tinyint(4) NULL default '0' AFTER `billable`");
}
- if ($_POST["convert11400to11727"]) {
+ 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`");
@@ -729,6 +729,8 @@ if ($_POST) {
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"]) {
@@ -761,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";
@@ -773,7 +776,7 @@ if ($_POST) {
| Create database structure (v1.17.27) + | Create database structure (v1.17.28)
(applies only to new installations, do not execute when updating) |