fix: refs #4988 insert into agencyWorkCenter
gitea/salix/pipeline/pr-test There was a failure building this commit Details

This commit is contained in:
Pablo Natek 2024-05-13 10:59:22 +02:00
parent 1e956bb0f8
commit 48392879cb
1 changed files with 4 additions and 3 deletions

View File

@ -13,6 +13,7 @@ CREATE TABLE IF NOT EXISTS `vn`.`agencyWorkCenter` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='refs #4988';
INSERT INTO vn.agencyWorkCenter (agencyFk, workCenterFk)
SELECT id, workCenterFk
FROM vn.agency
WHERE workCenterFk IS NOT NULL;
SELECT a.id, wc.id
FROM agency a
JOIN warehouse w ON w.id = a.warehouseFk
JOIN workCenter wc ON wc.warehouseFk = w.id;