fix: refs #7202 fixed sql
gitea/salix/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Jon Elias 2024-09-30 09:21:05 +02:00
parent 6fbc5a1a54
commit da749a5dcb
1 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@ ALTER TABLE vn.invoiceOut ADD COLUMN IF NOT EXISTS customsAgentFk INT(11) DEFAUL
ALTER TABLE vn.invoiceOut ADD CONSTRAINT invoiceOut_customsAgentFk FOREIGN KEY (customsAgentFk) ALTER TABLE vn.invoiceOut ADD CONSTRAINT invoiceOut_customsAgentFk FOREIGN KEY (customsAgentFk)
REFERENCES vn.customsAgent (id) ON DELETE RESTRICT ON UPDATE CASCADE; REFERENCES vn.customsAgent (id) ON DELETE RESTRICT ON UPDATE CASCADE;
UPDATE vn.invoiceOut i UPDATE vn.invoiceOut io
JOIN vn.client c ON c.id = io.clientFk JOIN vn.client c ON c.id = io.clientFk
JOIN vn.address a ON a.id = c.defaultAddressFk JOIN vn.address a ON a.id = c.defaultAddressFk
SET i.customsAgentFk = a.customsAgentFk; SET io.customsAgentFk = a.customsAgentFk;