Changeset 500 for trunk/admin/Updates.php
- Timestamp:
- Mar 10, 2013, 10:08:23 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/Updates.php
r499 r500 37 37 "VALUES (NULL , 'Parametry účtování', '2', 'FinanceCharge', '');"); 38 38 $Manager->Execute("INSERT INTO `ISMenuItem` (`Id` ,`Name` ,`Parent` ,`Table` ,`IconName`) ". 39 "VALUES (NULL , 'Úseky sítě', '2', 'NetworkSegment', '' ");39 "VALUES (NULL , 'Úseky sítě', '2', 'NetworkSegment', '');"); 40 40 $Manager->Execute("ALTER TABLE `ServiceCustomerRel` ADD `Action` ENUM( 'add', 'modify', 'remove' ) NULL , ". 41 41 "ADD `ReplaceId` INT NULL"); … … 121 121 } 122 122 123 function UpdateTo500($Manager) 124 { 125 $Manager->Execute("CREATE TABLE IF NOT EXISTS `FinanceBank` ( 126 `Id` int(11) NOT NULL AUTO_INCREMENT, 127 `Name` varchar(255) NOT NULL, 128 `Code` varchar(4) NOT NULL, 129 `BIC` varchar(255) NOT NULL, 130 `Country` int(11) NOT NULL, 131 PRIMARY KEY (`Id`), 132 KEY `Country` (`Country`) 133 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;"); 134 $Manager->Execute("ALTER TABLE `FinanceBank` 135 ADD CONSTRAINT `FinanceBank_ibfk_1` FOREIGN KEY (`Country`) REFERENCES `Country` (`Id`);"); 136 $Manager->Execute("ALTER TABLE `FinanceBankAccount` ADD `Bank` INT NOT NULL AFTER `Number` ,". 137 " ADD INDEX ( `Bank` )"); 138 $Manager->Execute("ALTER TABLE `FinanceBankAccount` ADD FOREIGN KEY ( `Bank` ) REFERENCES `FinanceBank` (". 139 "`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT ;"); 140 $Manager->Execute("INSERT INTO `ISMenuItem` (`Id` ,`Name` ,`Parent` ,`Table` ,`IconName`) ". 141 "VALUES (NULL , 'Banky', '2', 'FinanceBank', '');"); 142 } 143 123 144 $Updates = array( 124 145 491 => array('Revision' => 493, 'Function' => 'UpdateTo493'), … … 128 149 497 => array('Revision' => 498, 'Function' => 'UpdateTo498'), 129 150 498 => array('Revision' => 499, 'Function' => 'UpdateTo499'), 151 499 => array('Revision' => 500, 'Function' => 'UpdateTo500'), 130 152 ); 131 153
Note:
See TracChangeset
for help on using the changeset viewer.