Changeset 806 for trunk/Application/UpdateTrace.php
- Timestamp:
- Mar 6, 2016, 10:09:44 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/UpdateTrace.php
r803 r806 1858 1858 $Manager->Execute('ALTER TABLE `StockMove` ADD `Group` INT NOT NULL AFTER `File`, ADD INDEX (`Group`);'); 1859 1859 $Manager->Execute('ALTER TABLE `StockMove` ADD `Stock` INT NOT NULL AFTER `Time`, ADD INDEX (`Stock`);'); 1860 $Manager->Execute('ALTER TABLE `StockMove` ADD FOREIGN KEY (`Group`) REFERENCES `StockMoveGroup`(`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT;');1861 1860 $Manager->Execute('UPDATE `StockMove` SET `Group`=(SELECT `Id` FROM `StockMoveGroup` WHERE `StockMoveGroup`.`DocumentLine` = `StockMove`.`DocumentLine`)'); 1862 1861 $Manager->Execute('UPDATE `StockMove` SET `Stock`= `StockFrom` WHERE `DocumentLine` = 7'); 1863 1862 $Manager->Execute('UPDATE `StockMove` SET `Stock`= `StockTo` WHERE `DocumentLine` = 8'); 1863 $Manager->Execute('ALTER TABLE `StockMove` ADD FOREIGN KEY (`Group`) REFERENCES `StockMoveGroup`(`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT;'); 1864 1864 $Manager->Execute('ALTER TABLE `StockMove` DROP FOREIGN KEY StockMove_ibfk_2;'); 1865 1865 $Manager->Execute('ALTER TABLE `StockMove` DROP FOREIGN KEY StockMove_ibfk_1;'); … … 1867 1867 $Manager->Execute('ALTER TABLE `StockMove` DROP `StockFrom`, DROP `StockTo`, DROP `DocumentLine`;'); 1868 1868 $Manager->Execute('ALTER TABLE `StockMove` ADD FOREIGN KEY (`Stock`) REFERENCES `Stock`(`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT;'); 1869 1869 1870 1870 // Make BillCode as reference to DocumentLineCode table 1871 1871 $Manager->Execute('ALTER TABLE `StockMove` CHANGE `BillCode` `BillCodeText` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL');
Note:
See TracChangeset
for help on using the changeset viewer.