From 3c89d1e5e0ce208f90a8d0ca47ec2790a55ab5b5 Mon Sep 17 00:00:00 2001 From: Pako Date: Wed, 2 Oct 2024 07:34:57 +0200 Subject: [PATCH] fix: refs #8030 foreign key zoneGeo --- db/versions/11278-crimsonEucalyptus/00-firstScript.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/db/versions/11278-crimsonEucalyptus/00-firstScript.sql b/db/versions/11278-crimsonEucalyptus/00-firstScript.sql index 5686fee80..1c606b1cc 100644 --- a/db/versions/11278-crimsonEucalyptus/00-firstScript.sql +++ b/db/versions/11278-crimsonEucalyptus/00-firstScript.sql @@ -2,4 +2,5 @@ ALTER TABLE vn.priceDelta ADD IF NOT EXISTS zoneGeoFk int(11) NULL; -ALTER TABLE vn.priceDelta ADD CONSTRAINT priceDelta_XDiario_FK FOREIGN KEY IF NOT EXISTS (zoneGeoFk) REFERENCES vn.XDiario(id) ON DELETE RESTRICT ON UPDATE CASCADE; +ALTER TABLE vn.priceDelta ADD CONSTRAINT priceDelta_zoneGeo_FK FOREIGN KEY IF NOT EXISTS (zoneGeoFk) +REFERENCES `zoneGeo` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE;