Changeset 497 for trunk/admin/Updates.php
- Timestamp:
- Mar 3, 2013, 1:03:25 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/Updates.php
r495 r497 24 24 } 25 25 26 function UpdateTo497($Manager) 27 { 28 $Manager->Execute("ALTER TABLE `FinanceCharge` ADD `Id` INT NOT NULL AUTO_INCREMENT FIRST , ADD PRIMARY KEY ( `Id` ) "); 29 $Manager->Execute("ALTER TABLE `FinanceCharge` ADD `ReplaceId` INT NULL ,ADD INDEX ( `ReplaceId` ) "); 30 $Manager->Execute("DELETE FROM `FinanceCharge` WHERE `FinanceCharge`.`Period` = 1"); 31 $Manager->Execute("ALTER TABLE `FinanceCharge` DROP `Period`"); 32 $Manager->Execute("ALTER TABLE `FinanceCharge` ADD `Action` ENUM( 'add', 'modify', 'remove' ) NULL AFTER `TopTariffPrice` "); 33 $Manager->Execute("ALTER TABLE `FinanceCharge` ADD FOREIGN KEY ( `ReplaceId` ) REFERENCES `FinanceCharge` (". 34 "`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT ;"); 35 $Manager->Execute("ALTER TABLE `FinanceCharge` ADD INDEX ( `Action` )"); 36 $Manager->Execute("INSERT INTO `ISMenuItem` (`Id` ,`Name` ,`Parent` ,`Table` ,`IconName`) ". 37 "VALUES (NULL , 'Parametry účtování', '2', 'FinanceCharge', '');"); 38 $Manager->Execute("INSERT INTO `ISMenuItem` (`Id` ,`Name` ,`Parent` ,`Table` ,`IconName`) ". 39 "VALUES (NULL , 'Úseky sítě', '2', 'NetworkSegment', ''"); 40 $Manager->Execute("ALTER TABLE `ServiceCustomerRel` ADD `Action` ENUM( 'add', 'modify', 'remove' ) NULL , ". 41 "ADD `ReplaceId` INT NULL"); 42 $Manager->Execute("DELETE FROM `ServiceCustomerRel` WHERE `Period`=1"); 43 $Manager->Execute("ALTER TABLE `ServiceCustomerRel` DROP `Period`"); 44 $Manager->Execute("ALTER TABLE `ServiceCustomerRel` ADD INDEX ( `Action` )"); 45 $Manager->Execute("ALTER TABLE `ServiceCustomerRel` ADD INDEX ( `ReplaceId` ) "); 46 $Manager->Execute("ALTER TABLE `ServiceCustomerRel` ADD FOREIGN KEY ( `ReplaceId` ) REFERENCES `ServiceCustomerRel` (". 47 "`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT ;"); 48 $Manager->Execute("ALTER TABLE `Service` ADD `Action` ENUM( 'add', 'modify', 'remove' ) NULL AFTER `CustomerCount`"); 49 $Manager->Execute("ALTER TABLE `Service` ADD INDEX ( `Action` )"); 50 $Manager->Execute("INSERT INTO `ISMenuItem` (`Id` ,`Name` ,`Parent` ,`Table` ,`IconName`) ". 51 "VALUES (NULL , 'Placení zákazníků', '2', 'MemberPayment', '');"); 52 } 53 26 54 $Updates = array( 27 55 491 => array('Revision' => 493, 'Function' => 'UpdateTo493'), 28 56 493 => array('Revision' => 494, 'Function' => 'UpdateTo494'), 29 57 494 => array('Revision' => 495, 'Function' => 'UpdateTo495'), 58 495 => array('Revision' => 497, 'Function' => 'UpdateTo497'), 30 59 ); 31 60
Note:
See TracChangeset
for help on using the changeset viewer.