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) ADD CONSTRAINT address_zoneGeo_FK FOREIGN KEY (geoFk)
REFERENCES vn.zoneGeo(id) ON DELETE RESTRICT ON UPDATE CASCADE; 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)) (PRIMARY KEY (id))
ENGINE = MEMORY ENGINE = MEMORY
SELECT a.id, p.geoFk SELECT a.id, p.geoFk
@ -15,7 +15,7 @@ CREATE OR REPLACE TEMPORARY TABLE tAddressGeo
(p.code = a.postalCode) DESC; (p.code = a.postalCode) DESC;
UPDATE address a 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; 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) ADD CONSTRAINT client_zoneGeo_FK FOREIGN KEY (geoFk)
REFERENCES vn.zoneGeo(id) ON DELETE RESTRICT ON UPDATE CASCADE; 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)) (PRIMARY KEY (id))
ENGINE = MEMORY ENGINE = MEMORY
SELECT c.id, p.geoFk SELECT c.id, p.geoFk
@ -18,7 +18,7 @@ CREATE OR REPLACE TEMPORARY TABLE tClientGeo
(p.code = c.postcode) DESC; (p.code = c.postcode) DESC;
UPDATE client c 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; 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) ADD CONSTRAINT supplier_zoneGeo_FK FOREIGN KEY (geoFk)
REFERENCES vn.zoneGeo(id) ON DELETE RESTRICT ON UPDATE CASCADE; 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)) (PRIMARY KEY (id))
ENGINE = MEMORY ENGINE = MEMORY
SELECT s.id, p.geoFk SELECT s.id, p.geoFk
@ -19,7 +19,7 @@ CREATE OR REPLACE TEMPORARY TABLE tSupplierGeo
(p.code = sad.postalCode) DESC; (p.code = sad.postalCode) DESC;
UPDATE supplier s 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; SET s.geoFk = tsg.geoFk;
DROP TEMPORARY TABLE tSupplierGeo; DROP TEMPORARY TABLE tmp.tSupplierGeo;