Changeset 755 for trunk/Common/Setup/Updates.php
- Timestamp:
- Oct 25, 2015, 9:51:51 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Setup/Updates.php
r754 r755 1523 1523 'VALUES (NULL, "Kontrola změn stavů", "SchedulerNotifyCheck");'); 1524 1524 1525 $ this->Database->query('1525 $Manager->Database->query(' 1526 1526 CREATE TABLE IF NOT EXISTS `NotifyUser` ( 1527 1527 `Id` int(11) NOT NULL AUTO_INCREMENT, … … 1533 1533 KEY `Contact` (`Contact`) 1534 1534 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;'); 1535 $ this->Database->query('ALTER TABLE `NotifyUser`1535 $Manager->Database->query('ALTER TABLE `NotifyUser` 1536 1536 ADD CONSTRAINT `NotifyUser_ibfk_1` FOREIGN KEY (`User`) REFERENCES `User` (`Id`), 1537 1537 ADD CONSTRAINT `NotifyUser_ibfk_2` FOREIGN KEY (`Contact`) REFERENCES `Contact` (`Id`);'); 1538 1538 1539 $ this->Database->query('CREATE TABLE IF NOT EXISTS `NotifyCategory` (1539 $Manager->Database->query('CREATE TABLE IF NOT EXISTS `NotifyCategory` ( 1540 1540 `Id` int(11) NOT NULL AUTO_INCREMENT, 1541 1541 `Name` varchar(255) NOT NULL, … … 1544 1544 ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;'); 1545 1545 1546 $ this->Database->query("INSERT INTO `NotifyCategory` (`Id`, `Name`, `SysName`) VALUES1546 $Manager->Database->query("INSERT INTO `NotifyCategory` (`Id`, `Name`, `SysName`) VALUES 1547 1547 (1, 'Dostupnost zařízení (ping)', 'NetworkReachability'), 1548 1548 (2, 'Dostupnost URL', 'URL'), … … 1553 1553 } 1554 1554 1555 function UpdateTo755($Manager) 1556 { 1557 $Manager->Execute("INSERT INTO `FinanceInvoiceGroup` (`Id`, `Name`, `DocumentLine`, `ValueSign`, `Direction`) '. 1558 'VALUES (NULL, 'Přijaté faktury - storno', '5', '1', '0'), (NULL, 'Vydané faktury - storno', '6', '-1', '1')"); 1559 $Manager->Execute("ALTER TABLE `FinanceInvoice` ADD `VisibleToUser` INT NOT NULL DEFAULT '1' AFTER `Generate`;ALTER TABLE `FinanceInvoice` ADD `VisibleToUser` INT NOT NULL DEFAULT '1' AFTER `Generate`;"); 1560 1561 $Manager->Execute("CREATE TABLE IF NOT EXISTS `FinanceInvoiceStorno` ( 1562 `Id` int(11) NOT NULL AUTO_INCREMENT, 1563 `StornoBy` int(11) NOT NULL, 1564 `StornoOf` int(11) NOT NULL, 1565 PRIMARY KEY (`Id`), 1566 KEY `StornoBy` (`StornoBy`), 1567 KEY `StornoOf` (`StornoOf`) 1568 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;"); 1569 1570 $Manager->Execute("ALTER TABLE `FinanceInvoiceStorno` 1571 ADD CONSTRAINT `FinanceInvoiceStorno_ibfk_1` FOREIGN KEY (`StornoBy`) REFERENCES `FinanceInvoice` (`Id`), 1572 ADD CONSTRAINT `FinanceInvoiceStorno_ibfk_2` FOREIGN KEY (`StornoOf`) REFERENCES `FinanceInvoice` (`Id`); 1573 "); 1574 } 1555 1575 1556 1576 class Updates … … 1627 1647 747 => array('Revision' => 748, 'Function' => 'UpdateTo748'), 1628 1648 748 => array('Revision' => 752, 'Function' => 'UpdateTo752'), 1649 752 => array('Revision' => 755, 'Function' => 'UpdateTo755'), 1629 1650 )); 1630 1651 }
Note:
See TracChangeset
for help on using the changeset viewer.