Changeset 792 for trunk/Application
- Timestamp:
- Feb 3, 2016, 12:25:27 AM (9 years ago)
- Location:
- trunk/Application
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/UpdateTrace.php
r787 r792 1484 1484 } 1485 1485 $Manager->Execute('ALTER TABLE `FinanceInvoice` DROP `BillCodeText`;'); 1486 1487 //$Manager->Execute('RENAME TABLE `FinanceOperationGroup` TO `FinanceOperationTemplate`');1488 //$Manager->Execute('RENAME TABLE `FinanceInvoiceGroup` TO `FinanceInvoiceTemplate`');1489 1486 } 1490 1487 … … 1804 1801 $Manager->Execute('ALTER TABLE `Member` ADD `ChangeReplaceId` INT(11) NULL DEFAULT NULL;'); 1805 1802 $Manager->Execute('ALTER TABLE `Member` ADD FOREIGN KEY (`ChangeReplaceId`) REFERENCES `Member`(`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT;'); 1803 } 1804 1805 function UpdateTo792($Manager) 1806 { 1807 // Transform contracts 1808 $Manager->Execute('ALTER TABLE `Contract` CHANGE `BillCode` `BillCodeText` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL'); 1809 $Manager->Execute('ALTER TABLE `Contract` ADD `BillCode` INT NULL AFTER `BillCodeText`, ADD INDEX (`BillCode`)'); 1810 $Manager->Execute('ALTER TABLE `Contract` ADD FOREIGN KEY (`BillCode`) REFERENCES `DocumentLineCode`(`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT;'); 1811 $DbResult = $Manager->Execute('SELECT `Contract`.`Id`, `Contract`.`BillCodeText`, `Contract`.`DocumentLine` '. 1812 'FROM `Contract` '. 1813 'WHERE `Contract`.`BillCodeText`!=""'); 1814 while($DbRow = $DbResult->fetch_assoc()) 1815 { 1816 if($DbRow['DocumentLine'] == '') $DbRow['DocumentLine'] = 'NULL'; 1817 $Manager->Execute('INSERT INTO `DocumentLineCode` (`Id` ,`DocumentLine` ,`Name`) '. 1818 'VALUES (NULL , '.$DbRow['DocumentLine'].', "'.$DbRow['BillCodeText'].'");'); 1819 $CodeId = $Manager->Database->insert_id; 1820 $Manager->Execute('UPDATE `Contract` SET `BillCode`='.$CodeId.' WHERE `Id`='.$DbRow['Id']); 1821 } 1822 //$Manager->Execute('ALTER TABLE `Contract` DROP `BillCodeText`;'); 1806 1823 } 1807 1824 … … 1887 1904 768 => array('Revision' => 770, 'Function' => 'UpdateTo770'), 1888 1905 770 => array('Revision' => 785, 'Function' => 'UpdateTo785'), 1889 775 => array('Revision' => 786, 'Function' => 'UpdateTo786'), 1906 785 => array('Revision' => 786, 'Function' => 'UpdateTo786'), 1907 786 => array('Revision' => 792, 'Function' => 'UpdateTo792'), 1890 1908 )); 1891 1909 } -
trunk/Application/Version.php
r791 r792 1 1 <?php 2 2 3 $Revision = 79 0; // Subversion revision4 $DatabaseRevision = 7 85; // SQL structure revision5 $ReleaseTime = strtotime('2016-0 1-22');3 $Revision = 792; // Subversion revision 4 $DatabaseRevision = 792; // SQL structure revision 5 $ReleaseTime = strtotime('2016-02-02');
Note:
See TracChangeset
for help on using the changeset viewer.