diff options
author | msquare <msquare@notrademark.de> | 2016-08-22 19:32:54 +0200 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2016-08-22 19:32:54 +0200 |
commit | 3f4be08865296431d070e4386a252dac84d528ec (patch) | |
tree | 08ab8c245137dff544c7c928b4a924e604b41ece /db/update.d/06_Shifts.php | |
parent | 14d20933f7dcbf6d4aab3ee2c6444a19c7afdfd6 (diff) |
remove old update script
Diffstat (limited to 'db/update.d/06_Shifts.php')
-rw-r--r-- | db/update.d/06_Shifts.php | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/db/update.d/06_Shifts.php b/db/update.d/06_Shifts.php deleted file mode 100644 index 4aeb59b1..00000000 --- a/db/update.d/06_Shifts.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php -if(sql_num_query("SHOW COLUMNS FROM `Shifts` LIKE 'Date_'") == 2) { - if(sql_num_query("DESCRIBE `Shifts` `Len`") != 0) { - if(sql_num_query("SELECT * FROM `Shifts` WHERE DATE_SUB(`DateE`, INTERVAL (`Len`*60) MINUTE) != `DateS`") != 0) - die("Inconsistent data in Shifts table, won't do update " . __FILE__); - else { - sql_query("ALTER TABLE `Shifts` DROP `Len`"); - } - } - _datetime_to_int("Shifts", "DateS"); - _datetime_to_int("Shifts", "DateE"); - sql_query("ALTER TABLE `Shifts` CHANGE `DateS` `start` INT NOT NULL, CHANGE `DateE` `end` INT NOT NULL"); - - $applied = true; -} - -if(sql_num_query("DESCRIBE `Shifts` `Man`") === 1 && sql_num_query("DESCRIBE `Shifts` `name`") === 0) { - sql_query("ALTER TABLE `Shifts` CHANGE `Man` `name` VARCHAR(1024) NULL"); - - $applied = true; -} - -$res = sql_select("DESCRIBE `Shifts` `PSID`"); -if($res[0]['Type'] == 'text') { - sql_query("ALTER TABLE `Shifts` CHANGE `PSID` `PSID` INT NULL"); - - $applied = true; -} -_add_index("Shifts", array("PSID"), "UNIQUE"); -_add_index("Shifts", array("RID")); -?> |