X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=dbinstall.php;h=9c2d041b667b266a99ee74c911b2849c682e8c98;hb=a62e4bdd1bc89ea4f3cf29507399b5b8f229597a;hp=9f6972c93f0cfd5191093aaef44187296f5a0919;hpb=e80e19c6b609af8e06403a337a5cd46200ab4fc6;p=timetracker.git diff --git a/dbinstall.php b/dbinstall.php index 9f6972c9..9c2d041b 100644 --- a/dbinstall.php +++ b/dbinstall.php @@ -805,7 +805,7 @@ if ($_POST) { print "Updated $users_updated users...
\n"; } - if ($_POST["convert11744to11765"]) { + if ($_POST["convert11744to11766"]) { setChange("update `tt_roles` inner join `tt_site_config` sc on (sc.param_name = 'version_db' and sc.param_value = '1.17.44') set rights = replace(rights, 'override_punch_mode,override_date_lock', 'override_punch_mode,override_own_punch_mode,override_date_lock')"); setChange("UPDATE `tt_site_config` SET param_value = '1.17.48' where param_name = 'version_db' and param_value = '1.17.44'"); setChange("update `tt_users` inner join `tt_site_config` sc on (sc.param_name = 'version_db' and sc.param_value = '1.17.48') set role_id = (select id from tt_roles where team_id = 0 and rank = 512) where role = 324"); @@ -852,6 +852,10 @@ if ($_POST) { setChange("ALTER TABLE `tt_teams` ADD `modified_by` int(11) default NULL AFTER `modified_ip`"); setChange("UPDATE `tt_site_config` SET param_value = '1.17.65', modified = now() where param_name = 'version_db' and param_value = '1.17.64'"); setChange("update `tt_teams` t inner join `tt_site_config` sc on (sc.param_name = 'version_db' and sc.param_value = '1.17.65') set t.created = t.timestamp where t.created is null"); + setChange("update `tt_users` u inner join `tt_site_config` sc on (sc.param_name = 'version_db' and sc.param_value = '1.17.65') set u.created = u.timestamp where u.created is null"); + setChange("ALTER TABLE `tt_teams` drop `timestamp`"); + setChange("ALTER TABLE `tt_users` drop `timestamp`"); + setChange("UPDATE `tt_site_config` SET param_value = '1.17.66', modified = now() where param_name = 'version_db' and param_value = '1.17.65'"); } if ($_POST["cleanup"]) { @@ -897,7 +901,7 @@ if ($_POST) {

DB Install

-
Create database structure (v1.17.65) + Create database structure (v1.17.66)
(applies only to new installations, do not execute when updating)
@@ -937,8 +941,8 @@ if ($_POST) {
- Update database structure (v1.17.44 to v1.17.65) - + Update database structure (v1.17.44 to v1.17.66) +