Changeset 498 for trunk/admin/Updates.php
- Timestamp:
- Mar 3, 2013, 6:02:17 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/Updates.php
r497 r498 52 52 } 53 53 54 function UpdateTo498($Manager) 55 { 56 $Manager->Execute("INSERT INTO `ISMenuItem` (`Id` ,`Name` ,`Parent` ,`Table` ,`IconName`) ". 57 "VALUES (NULL , 'Sítové služby', '1', 'NetworkConfiguration', '');"); 58 $Manager->Execute("INSERT INTO `centrala`.`ISMenuItem` (`Id` ,`Name` ,`Parent` ,`Table` ,`IconName`) ". 59 "VALUES (NULL , 'Fronta e-mailů', '23', 'EmailQueue', '');"); 60 $Manager->Execute("CREATE TABLE IF NOT EXISTS `FinanceVAT` ( 61 `Id` int(11) NOT NULL AUTO_INCREMENT, 62 `Name` varchar(255) NOT NULL, 63 `ValidFrom` date NOT NULL, 64 `Value` int(11) NOT NULL, 65 PRIMARY KEY (`Id`) 66 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; 67 INSERT INTO `FinanceVAT` (`Id`, `Name`, `ValidFrom`, `Value`) VALUES 68 (1, 'DPH snížená sazba', '2013-01-01', 15), 69 (2, 'DPH běžná sazba', '2013-01-01', 21);"); 70 $Manager->Execute("ALTER TABLE `Service` ADD `VAT` INT NOT NULL AFTER `Price`"); 71 $Manager->Execute("ALTER TABLE `Service` ADD INDEX ( `VAT` ) "); 72 $Manager->Execute("UPDATE `Service` SET `VAT` = 2;"); 73 $Manager->Execute("ALTER TABLE `Service` ADD FOREIGN KEY ( `VAT` ) REFERENCES `FinanceVAT` (". 74 "`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT ;"); 75 $Manager->Execute("ALTER TABLE `FinanceInvoice` ADD `Cash` INT NOT NULL DEFAULT '0'"); 76 } 77 54 78 $Updates = array( 55 79 491 => array('Revision' => 493, 'Function' => 'UpdateTo493'), … … 57 81 494 => array('Revision' => 495, 'Function' => 'UpdateTo495'), 58 82 495 => array('Revision' => 497, 'Function' => 'UpdateTo497'), 83 497 => array('Revision' => 497, 'Function' => 'UpdateTo498'), 59 84 ); 60 85
Note:
See TracChangeset
for help on using the changeset viewer.