X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=dbinstall.php;h=6dc831aeafdb39d85585ea3aa9250fadb893cc79;hb=f1f7c9878df54a56803a8fb2e557497a28def409;hp=5c02031fd0816def66624fe5a7c0f83b580bc660;hpb=2e02b27f8c392d5a2f446f7b51982175e9bf32c4;p=timetracker.git
diff --git a/dbinstall.php b/dbinstall.php
index 5c02031f..6dc831ae 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["convert11400to11730"]) {
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,9 @@ 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)");
+ setChange("ALTER TABLE `tt_roles` ADD `description` varchar(255) default NULL AFTER `name`");
}
if ($_POST["cleanup"]) {
@@ -761,6 +764,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 +777,7 @@ if ($_POST) {
Create database structure (v1.17.27) + | Create database structure (v1.17.30)
(applies only to new installations, do not execute when updating) |