engelsystem/db/update.d/22_shifts.php

6 lines
228 B
PHP

<?php
if(sql_num_query("SHOW INDEX FROM `ShiftEntry` WHERE `Key_name` = 'SID' AND `Column_name` = 'TID'") == 0) {
sql_query("ALTER TABLE `ShiftEntry` DROP INDEX `SID`, ADD INDEX `SID` ( `SID` , `TID` )");
$applied = true;
}