Ignore:
Timestamp:
May 25, 2014, 8:29:03 PM (11 years ago)
Author:
chronos
Message:
  • Přidáno: Záznam změn online stavu dostupnosti rozhraní do tabulky.
File:
1 edited

Legend:

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

    r656 r657  
    706706}
    707707
     708function UpdateTo657($Manager)
     709{
     710        $Manager->Execute('CREATE TABLE IF NOT EXISTS `NetworkInterfaceUpDown` (
     711  `Id` int(11) NOT NULL AUTO_INCREMENT,
     712  `Time` datetime NOT NULL,
     713  `Interface` int(11) NOT NULL,
     714  `State` int(11) NOT NULL,
     715  PRIMARY KEY (`Id`),
     716  KEY `Interface` (`Interface`)
     717) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;');
     718  $Manager->Execute('ALTER TABLE `NetworkInterfaceUpDown`
     719    ADD CONSTRAINT `NetworkInterfaceUpDown_ibfk_1` FOREIGN KEY (`Interface`) REFERENCES `NetworkInterface` (`Id`);');
     720  $Manager->Execute("INSERT INTO `Action` (
     721`Id` ,`Name` ,`Title` ,`Type` ,`URL` ,`Group` ,`Icon` ,`PermissionOperation` ,
     722`Enable`) VALUES (NULL , '', 'Změny stavu rozhraní', '1', '/is/?t=NetworkInterfaceUpDown&a=list', NULL , NULL , NULL , '1'
     723);");
     724  $ActionId = $Manager->Database->insert_id;
     725  $Manager->Execute("INSERT INTO `MenuItem` (`Id` ,`Name` ,`Parent` ,`Action` ,`Menu`) ".
     726    "VALUES (NULL , 'Změny stavu rozhraní', 4, '".$ActionId."', '1');");
     727}
     728
    708729class Updates
    709730{
     
    745766      645 => array('Revision' => 646, 'Function' => 'UpdateTo646'),
    746767      646 => array('Revision' => 647, 'Function' => 'UpdateTo647'),
     768      647 => array('Revision' => 657, 'Function' => 'UpdateTo657'),
    747769    ));
    748770  }
Note: See TracChangeset for help on using the changeset viewer.