Changeset 671 for trunk/Common/Setup/Updates.php
- Timestamp:
- Jul 19, 2014, 1:21:24 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Setup/Updates.php
r668 r671 759 759 $Manager->Execute("INSERT INTO `MenuItem` (`Id` ,`Name` ,`Parent` ,`Action` ,`Menu`) ". 760 760 "VALUES (NULL , 'Kontakty', '12', '".$ActionId."', '1');"); 761 $Con atctMenuId = $Manager->Database->insert_id;761 $ContactMenuId = $Manager->Database->insert_id; 762 762 763 763 $Manager->Execute("INSERT INTO `Action` ( … … 767 767 $ActionId = $Manager->Database->insert_id; 768 768 $Manager->Execute("INSERT INTO `MenuItem` (`Id` ,`Name` ,`Parent` ,`Action` ,`Menu`) ". 769 "VALUES (NULL , 'Druhy kontaktů', ".$Con atctMenuId.", '".$ActionId."', '1');");769 "VALUES (NULL , 'Druhy kontaktů', ".$ContactMenuId.", '".$ActionId."', '1');"); 770 770 771 771 $Manager->Execute("INSERT INTO `ContactCategory` (`Id` ,`Name`) … … 797 797 $Manager->Execute('INSERT INTO `Module` (`Id` ,`Name` ,`Title`) 798 798 VALUES (NULL , "RSS", "RSS kanály");'); 799 } 800 801 function UpdateTo671($Manager) 802 { 803 $Manager->Execute('CREATE TABLE IF NOT EXISTS `NetworkSignal` ( 804 `Id` int(11) NOT NULL AUTO_INCREMENT, 805 `Time` datetime NOT NULL, 806 `MAC` varchar(17) NOT NULL, 807 `Interface` int(11) DEFAULT NULL, 808 `Value` int(11) NOT NULL, 809 PRIMARY KEY (`Id`), 810 KEY `Interface` (`Interface`) 811 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;'); 812 813 $Manager->Execute('ALTER TABLE `NetworkSignal` 814 ADD CONSTRAINT `NetworkSignal_ibfk_1` FOREIGN KEY (`Interface`) REFERENCES `NetworkInterface` (`Id`);'); 815 $Manager->Execute('INSERT INTO `Action` (`Id` ,`Name` ,`Title` ,`Type` ,`URL` , 816 `Group` ,`Icon` ,`PermissionOperation` ,`Enable`) VALUES ( 817 NULL , "", "Signál rozhraní", "1", "/is/?t=NetworkSignal&a=list", NULL , NULL , NULL , "1");'); 818 $ActionId = $Manager->Database->insert_id; 819 $Manager->Execute("INSERT INTO `MenuItem` (`Id` ,`Name` ,`Parent` ,`Action` ,`Menu`) ". 820 "VALUES (NULL , 'Signál rozhraní', 4, '".$ActionId."', '1');"); 821 822 $Manager->Execute('ALTER TABLE `NetworkDevice` ADD `API` INT NULL ,ADD INDEX ( `API` ) ;'); 823 $Manager->Execute('CREATE TABLE IF NOT EXISTS `DeviceAPIType` ( 824 `Id` int(11) NOT NULL AUTO_INCREMENT, 825 `Name` varchar(255) NOT NULL, 826 PRIMARY KEY (`Id`) 827 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;'); 828 829 $Manager->Execute('INSERT INTO `DeviceAPIType` (`Id`, `Name`) VALUES 830 (1, "RouterOS API"), 831 (2, "AirOS");'); 832 $Manager->Execute('ALTER TABLE `NetworkDevice` ADD FOREIGN KEY ( `API` ) REFERENCES `DeviceAPIType` ( 833 `Id`) ON DELETE RESTRICT ON UPDATE RESTRICT ;'); 834 799 835 } 800 836 … … 842 878 661 => array('Revision' => 662, 'Function' => 'UpdateTo662'), 843 879 662 => array('Revision' => 668, 'Function' => 'UpdateTo668'), 880 668 => array('Revision' => 671, 'Function' => 'UpdateTo671'), 844 881 )); 845 882 }
Note:
See TracChangeset
for help on using the changeset viewer.