Changeset 765 for trunk/Common/Setup/Updates.php
- Timestamp:
- Nov 6, 2015, 8:40:19 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Setup/Updates.php
r763 r765 1604 1604 } 1605 1605 1606 function UpdateTo765($Manager) 1607 { 1608 $Manager->Execute('CREATE TABLE IF NOT EXISTS `SupportActivity` ( 1609 `Id` int(11) NOT NULL AUTO_INCREMENT, 1610 `Description` text NOT NULL, 1611 `Customer` int(11) NOT NULL, 1612 `User` int(11) NOT NULL, 1613 `Time` datetime NOT NULL, 1614 PRIMARY KEY (`Id`), 1615 KEY `User` (`User`), 1616 KEY `Customer` (`Customer`) 1617 ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;'); 1618 1619 $Manager->Execute('ALTER TABLE `SupportActivity` 1620 ADD CONSTRAINT `SupportActivity_ibfk_1` FOREIGN KEY (`Customer`) REFERENCES `Member` (`Id`), 1621 ADD CONSTRAINT `SupportActivity_ibfk_2` FOREIGN KEY (`User`) REFERENCES `User` (`Id`);'); 1622 1623 // IS menu item 1624 $Manager->Execute('INSERT INTO `Action` (`Id` ,`Name` ,`Title` ,`Type` ,`URL` , 1625 `Group` ,`Icon` ,`PermissionOperation` ,`Enable`) VALUES ( 1626 NULL , "", "Zákaznická podpora", "1", "/is/?t=SupportActivity&a=list", NULL , NULL , NULL , "1");'); 1627 $ActionId = $Manager->Database->insert_id; 1628 $DbResult = $Manager->Execute('SELECT `Id` FROM `MenuItem` WHERE `Name`="Zákazníci"'); 1629 if($DbResult->num_rows > 0) 1630 { 1631 $DbRow = $DbResult->fetch_assoc(); 1632 $Manager->Execute("INSERT INTO `MenuItem` (`Id` ,`Name` ,`Parent` ,`Action` ,`Menu`) ". 1633 "VALUES (NULL , 'Zákazická podpora', ".$DbRow['Id'].", '".$ActionId."', '1');"); 1634 } 1635 } 1606 1636 1607 1637 class Updates … … 1682 1712 759 => array('Revision' => 762, 'Function' => 'UpdateTo762'), 1683 1713 762 => array('Revision' => 763, 'Function' => 'UpdateTo763'), 1714 763 => array('Revision' => 765, 'Function' => 'UpdateTo765'), 1684 1715 )); 1685 1716 }
Note:
See TracChangeset
for help on using the changeset viewer.