7383-testToMaster #2445
|
@ -1,4 +1,3 @@
|
|||
|
||||
CREATE OR REPLACE TABLE `vn`.`farmingDeliveryNote` (
|
||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`farmingFk` int(10) unsigned NOT NULL,
|
||||
|
@ -10,3 +9,8 @@ CREATE OR REPLACE TABLE `vn`.`farmingDeliveryNote` (
|
|||
CONSTRAINT `farmingDeliveryNoteFk_FK` FOREIGN KEY (`deliveryNoteFk`) REFERENCES `deliveryNote` (`id`),
|
||||
CONSTRAINT `farmingDeliveryNoteFk_FK_1` FOREIGN KEY (`farmingFk`) REFERENCES `farming` (`id`)
|
||||
);
|
||||
|
||||
INSERT IGNORE INTO `vn`.`farmingDeliveryNote` (farmingFk, deliveryNoteFk, amount)
|
||||
SELECT farmingFk, id, amount
|
||||
FROM vn.deliveryNote dn
|
||||
WHERE farmingFk;
|
Loading…
Reference in New Issue