Changeset 645 for trunk/Common/Setup/Updates.php
- Timestamp:
- Mar 25, 2014, 12:38:20 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Setup/Updates.php
r644 r645 562 562 } 563 563 564 function UpdateTo645($Manager) 565 { 566 $Manager->Execute('CREATE TABLE IF NOT EXISTS `FinanceVATType` ( 567 `Id` int(11) NOT NULL, 568 `Name` varchar(255) NOT NULL, 569 PRIMARY KEY (`Id`) 570 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;'); 571 $Manager->Execute('INSERT INTO `FinanceVATType` FROM (SELECT Id, Name FROM `FinanceVAT`)'); 572 $Manager->Execute('ALTER TABLE `FinanceVAT` ADD `ValidTo` DATE NULL , 573 ADD `Type` INT NOT NULL ;'); 574 $Manager->Execute('UPDATE `FinanceVAT` SET `Type`=(SELECT `Id` FROM `FinanceVATType` WHERE `FinanceVATType`.`Name`=`FinanceVAT`.`Name`)'); 575 $Manager->Execute('ALTER TABLE `FinanceVAT` DROP `Name`'); 576 } 577 578 564 579 class Updates 565 580 { … … 598 613 627 => array('Revision' => 632, 'Function' => 'UpdateTo632'), 599 614 632 => array('Revision' => 633, 'Function' => 'UpdateTo633'), 615 633 => array('Revision' => 645, 'Function' => 'UpdateTo645'), 600 616 )); 601 617 }
Note:
See TracChangeset
for help on using the changeset viewer.