From aed4bc89c7eb09f808778804fa5ee94d93909e0a Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 18 Nov 2024 12:53:36 +0100 Subject: [PATCH] feat: refs #8057 Fix version --- db/versions/11346-yellowPhormium/00-address.sql | 6 +++--- db/versions/11346-yellowPhormium/01-client.sql | 6 +++--- db/versions/11346-yellowPhormium/02-supplier.sql | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/db/versions/11346-yellowPhormium/00-address.sql b/db/versions/11346-yellowPhormium/00-address.sql index a8ee88b94..70683fc8f 100644 --- a/db/versions/11346-yellowPhormium/00-address.sql +++ b/db/versions/11346-yellowPhormium/00-address.sql @@ -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; diff --git a/db/versions/11346-yellowPhormium/01-client.sql b/db/versions/11346-yellowPhormium/01-client.sql index e1294c30e..a8bd16921 100644 --- a/db/versions/11346-yellowPhormium/01-client.sql +++ b/db/versions/11346-yellowPhormium/01-client.sql @@ -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; diff --git a/db/versions/11346-yellowPhormium/02-supplier.sql b/db/versions/11346-yellowPhormium/02-supplier.sql index 57cdefaea..5f902d039 100644 --- a/db/versions/11346-yellowPhormium/02-supplier.sql +++ b/db/versions/11346-yellowPhormium/02-supplier.sql @@ -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;