Changeset 743 for trunk/Common/Setup/Updates.php
- Timestamp:
- Sep 3, 2015, 9:25:53 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.