Ignore:
Timestamp:
Mar 16, 2016, 10:01:02 PM (9 years ago)
Author:
chronos
Message:
  • Added: UpDown history for network ports.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/UpdateTrace.php

    r817 r818  
    19881988  $Manager->Execute('UPDATE `NetworkConfiguration` SET `SysName`="RouterosDNS" WHERE `Id`=13');
    19891989  $Manager->Execute('ALTER TABLE `NetworkConfiguration` DROP `Execute`;');
     1990}
     1991
     1992function UpdateTo818($Manager)
     1993{
     1994  $Manager->Execute('ALTER TABLE `NetworkPort` ADD `Protocol` INT NOT NULL AFTER `Enabled`;');
     1995  $Manager->Execute('CREATE TABLE IF NOT EXISTS `NetworkPortUpDown` (
     1996    `Id` int(11) NOT NULL AUTO_INCREMENT,
     1997    `Time` datetime NOT NULL,
     1998    `Port` int(11) NOT NULL,
     1999    `State` int(11) NOT NULL,
     2000    `Duration` int(11) DEFAULT NULL,
     2001    PRIMARY KEY (`Id`),
     2002    KEY `Port` (`Port`),
     2003    KEY `Time` (`Time`)
     2004    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;');
     2005   $Manager->Execute('ALTER TABLE `NetworkPortUpDown`
     2006     ADD CONSTRAINT `NetworkPortUpDown_ibfk_1` FOREIGN KEY (`Port`) REFERENCES `NetworkPort` (`Id`);');
    19902007}
    19912008
     
    20802097      808 => array('Revision' => 814, 'Function' => 'UpdateTo814'),
    20812098      814 => array('Revision' => 817, 'Function' => 'UpdateTo817'),
     2099      817 => array('Revision' => 818, 'Function' => 'UpdateTo818'),
    20822100    ));
    20832101  }
Note: See TracChangeset for help on using the changeset viewer.