Ignore:
Timestamp:
Sep 24, 2014, 12:40:54 PM (10 years ago)
Author:
chronos
Message:
  • Opraveno: U nově vložených položek stavu rozhraní se určuje trvání stavu do budoucna. V předchozím commitu se chybně počítalo trvání do minulosti.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Common/Setup/Updates.php

    r696 r697  
    920920}
    921921
     922function UpdateTo697($Manager)
     923{
     924        $Manager->Execute('ALTER TABLE `NetworkInterfaceUpDown` CHANGE `Duration` `Duration` INT( 11 ) NULL ;');
     925        $Manager->Execute('UPDATE `NetworkInterfaceUpDown` SET `Duration` = NULL');
     926        $Manager->Execute('UPDATE `NetworkInterfaceUpDown` AS `TM` SET `Duration` = TIMESTAMPDIFF(SECOND,
     927    `TM`.`Time`, (SELECT `Time` FROM (SELECT * FROM `NetworkInterfaceUpDown`) AS `TA` WHERE (`TA`.`Time` > `TM`.`Time`)
     928    AND (`TA`.`Interface`=`TM`.`Interface`) ORDER BY `TA`.`Time` ASC LIMIT 1))');
     929}
    922930
    923931class Updates
     
    972980      688 => array('Revision' => 692, 'Function' => 'UpdateTo692'),
    973981      692 => array('Revision' => 696, 'Function' => 'UpdateTo696'),
     982      696 => array('Revision' => 697, 'Function' => 'UpdateTo697'),
    974983    ));
    975984  }
Note: See TracChangeset for help on using the changeset viewer.