X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=dbinstall.php;h=d84cf4f3fe750a3e45acb57f2931701666e6d7a3;hb=6cb9c41aae566dcc564fa8ad3a6c6ee4facdf373;hp=491330f232916f6a42feed88b0fe6cd1a48eb908;hpb=ebcf3daac421df8e3925e5fff52b26d4bb789286;p=timetracker.git diff --git a/dbinstall.php b/dbinstall.php index 491330f2..d84cf4f3 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["convert11400to11728"]) { + if ($_POST["convert11400to11734"]) { 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,8 +729,12 @@ 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 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`"); + setChange("ALTER TABLE `tt_users` ADD `role_id` int(11) default NULL AFTER `role`"); + setChange("CREATE TABLE `tt_site_config` (`param_name` varchar(32) NOT NULL, `param_value` text default NULL, `created` datetime default CURRENT_TIMESTAMP, `updated` datetime ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`param_name`))"); + setChange("INSERT INTO `tt_site_config` (`param_name`, `param_value`) VALUES ('version_db', '1.17.34')"); } if ($_POST["cleanup"]) { @@ -776,7 +780,7 @@ if ($_POST) {
Create database structure (v1.17.28) + | Create database structure (v1.17.34)
(applies only to new installations, do not execute when updating) |