Merge branch 'test' into dev
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Andrés 2024-04-25 19:23:48 +02:00
commit a4417dde6c
1 changed files with 5 additions and 1 deletions

View File

@ -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;