Changeset 743
- Timestamp:
- Sep 3, 2015, 9:25:53 AM (9 years ago)
- Location:
- trunk/Common
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/AppModule.php
r738 r743 101 101 { 102 102 if(!$this->Installed) return; 103 if($this->InstalledVersion == $this->Version) return; 103 104 $List = array(); 104 105 $this->Manager->EnumSuperiorDependenciesCascade($this, $List, array(ModuleCondition::Installed)); … … 175 176 protected function DoUninstall() 176 177 { 178 } 179 180 protected function DoUpgrade() 181 { 182 177 183 } 178 184 } … … 213 219 if($Action == ModuleAction::Enable) $Module->Enable(); 214 220 if($Action == ModuleAction::Disable) $Module->Disable(); 221 if($Action == ModuleAction::Upgrade) $Module->Upgrade(); 215 222 } 216 223 } … … 360 367 } 361 368 } 362 -
trunk/Common/Setup/Updates.php
r742 r743 1432 1432 $Manager->Execute('ALTER TABLE `FinanceInvoiceGroup` ADD `Direction` INT NOT NULL ;'); 1433 1433 $Manager->Execute('UPDATE `FinanceInvoiceGroup` SET `Direction` = 1 WHERE ValueSign=1'); 1434 $Manager->Execute('ALTER TABLE `FinanceInvoice` ADD `Direction` INT NOT NULL AFTER `TimePayment`;'); 1434 $Manager->Execute('ALTER TABLE `FinanceInvoice` ADD `Direction` INT NOT NULL AFTER `TimePayment`;'); 1435 1435 $Manager->Execute('UPDATE `FinanceInvoice` SET `Direction` = 1 WHERE ValueSign=1'); 1436 1436 } … … 1448 1448 $Manager->Execute('ALTER TABLE `DocumentLineCode` 1449 1449 ADD CONSTRAINT `DocumentLineCode_ibfk_1` FOREIGN KEY (`DocumentLine`) REFERENCES `DocumentLine` (`Id`);'); 1450 1450 1451 1451 // Transform finance operations 1452 1452 $Manager->Execute('ALTER TABLE `FinanceOperation` CHANGE `BillCode` `BillCodeText` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL'); … … 1454 1454 $Manager->Execute('ALTER TABLE `FinanceOperation` ADD FOREIGN KEY (`BillCode`) REFERENCES `DocumentLineCode`(`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT;'); 1455 1455 $DbResult = $Manager->Execute('SELECT `FinanceOperation`.`Id`, `FinanceOperation`.`BillCodeText`, `FinanceOperationGroup`.`DocumentLine` '. 1456 'FROM `Finance Invoice` '.1456 'FROM `FinanceOperation` '. 1457 1457 'LEFT JOIN `FinanceOperationGroup` ON `FinanceOperationGroup`.`Id` = `FinanceOperation`.`Group` '. 1458 1458 'WHERE `FinanceOperation`.`BillCodeText`!=""'); … … 1466 1466 } 1467 1467 $Manager->Execute('ALTER TABLE `FinanceOperation` DROP `BillCodeText`;'); 1468 1468 1469 1469 // Transform invoices 1470 1470 $Manager->Execute('ALTER TABLE `FinanceInvoice` CHANGE `BillCode` `BillCodeText` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL'); … … 1484 1484 } 1485 1485 $Manager->Execute('ALTER TABLE `FinanceInvoice` DROP `BillCodeText`;'); 1486 1486 1487 1487 //$Manager->Execute('RENAME TABLE `FinanceOperationGroup` TO `FinanceOperationTemplate`'); 1488 1488 //$Manager->Execute('RENAME TABLE `FinanceInvoiceGroup` TO `FinanceInvoiceTemplate`');
Note:
See TracChangeset
for help on using the changeset viewer.