feat: refs #8057 Fix version
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Guillermo Bonet 2024-11-18 12:53:36 +01:00
parent baadd621e1
commit aed4bc89c7
3 changed files with 9 additions and 9 deletions

View File

@ -3,7 +3,7 @@ ALTER TABLE vn.address
ADD CONSTRAINT address_zoneGeo_FK FOREIGN KEY (geoFk)
REFERENCES vn.zoneGeo(id) ON DELETE RESTRICT ON UPDATE CASCADE;
CREATE OR REPLACE TEMPORARY TABLE tAddressGeo
CREATE OR REPLACE TEMPORARY TABLE tmp.tAddressGeo
(PRIMARY KEY (id))
ENGINE = MEMORY
SELECT a.id, p.geoFk
@ -15,7 +15,7 @@ CREATE OR REPLACE TEMPORARY TABLE tAddressGeo
(p.code = a.postalCode) DESC;
UPDATE address a
JOIN tAddressGeo tag ON tag.id = a.id
JOIN tmp.tAddressGeo tag ON tag.id = a.id
SET a.geoFk = tag.geoFk;
DROP TEMPORARY TABLE tAddressGeo;
DROP TEMPORARY TABLE tmp.tAddressGeo;

View File

@ -6,7 +6,7 @@ ALTER TABLE vn.client
ADD CONSTRAINT client_zoneGeo_FK FOREIGN KEY (geoFk)
REFERENCES vn.zoneGeo(id) ON DELETE RESTRICT ON UPDATE CASCADE;
CREATE OR REPLACE TEMPORARY TABLE tClientGeo
CREATE OR REPLACE TEMPORARY TABLE tmp.tClientGeo
(PRIMARY KEY (id))
ENGINE = MEMORY
SELECT c.id, p.geoFk
@ -18,7 +18,7 @@ CREATE OR REPLACE TEMPORARY TABLE tClientGeo
(p.code = c.postcode) DESC;
UPDATE client c
JOIN tClientGeo tcg ON tcg.id = c.id
JOIN tmp.tClientGeo tcg ON tcg.id = c.id
SET c.geoFk = tcg.geoFk;
DROP TEMPORARY TABLE tClientGeo;
DROP TEMPORARY TABLE tmp.tClientGeo;

View File

@ -5,7 +5,7 @@ ALTER TABLE vn.supplier
ADD CONSTRAINT supplier_zoneGeo_FK FOREIGN KEY (geoFk)
REFERENCES vn.zoneGeo(id) ON DELETE RESTRICT ON UPDATE CASCADE;
CREATE OR REPLACE TEMPORARY TABLE tSupplierGeo
CREATE OR REPLACE TEMPORARY TABLE tmp.tSupplierGeo
(PRIMARY KEY (id))
ENGINE = MEMORY
SELECT s.id, p.geoFk
@ -19,7 +19,7 @@ CREATE OR REPLACE TEMPORARY TABLE tSupplierGeo
(p.code = sad.postalCode) DESC;
UPDATE supplier s
JOIN tSupplierGeo tsg ON tsg.id = s.id
JOIN tmp.tSupplierGeo tsg ON tsg.id = s.id
SET s.geoFk = tsg.geoFk;
DROP TEMPORARY TABLE tSupplierGeo;
DROP TEMPORARY TABLE tmp.tSupplierGeo;