From b7655b4f9208a807d217f1934f76806c5b740a6d Mon Sep 17 00:00:00 2001 From: guillermo Date: Thu, 14 Nov 2024 08:24:42 +0100 Subject: [PATCH] feat: refs #8057 Added geoFk columns --- db/versions/11346-yellowPhormium/00-address.sql | 4 ++++ db/versions/11346-yellowPhormium/01-client.sql | 7 +++++++ db/versions/11346-yellowPhormium/02-supplier.sql | 6 ++++++ 3 files changed, 17 insertions(+) create mode 100644 db/versions/11346-yellowPhormium/00-address.sql create mode 100644 db/versions/11346-yellowPhormium/01-client.sql create mode 100644 db/versions/11346-yellowPhormium/02-supplier.sql diff --git a/db/versions/11346-yellowPhormium/00-address.sql b/db/versions/11346-yellowPhormium/00-address.sql new file mode 100644 index 000000000..02e09bd00 --- /dev/null +++ b/db/versions/11346-yellowPhormium/00-address.sql @@ -0,0 +1,4 @@ +ALTER TABLE vn.address + ADD geoFk int(11) DEFAULT NULL NULL AFTER isLogifloraAllowed, + ADD CONSTRAINT address_zoneGeo_FK FOREIGN KEY (geoFk) + REFERENCES vn.zoneGeo(id) ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/db/versions/11346-yellowPhormium/01-client.sql b/db/versions/11346-yellowPhormium/01-client.sql new file mode 100644 index 000000000..c58810fb1 --- /dev/null +++ b/db/versions/11346-yellowPhormium/01-client.sql @@ -0,0 +1,7 @@ +ALTER TABLE vn.client + CHANGE hasDailyInvoice hasDailyInvoice tinyint(1) DEFAULT 0 NOT NULL + COMMENT 'Indica si el cliente requiere facturación diaria por defecto se copiará lo que tenga country.hasDailyInvoice' + AFTER recommendedCredit, + ADD geoFk int(11) DEFAULT NULL NULL AFTER hasDailyInvoice, + ADD CONSTRAINT client_zoneGeo_FK FOREIGN KEY (geoFk) + REFERENCES vn.zoneGeo(id) ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/db/versions/11346-yellowPhormium/02-supplier.sql b/db/versions/11346-yellowPhormium/02-supplier.sql new file mode 100644 index 000000000..f38202d5e --- /dev/null +++ b/db/versions/11346-yellowPhormium/02-supplier.sql @@ -0,0 +1,6 @@ +ALTER TABLE vn.supplier + CHANGE companySize companySize enum('small','medium','big') CHARACTER SET utf8mb3 + COLLATE utf8mb3_general_ci DEFAULT NULL NULL AFTER stamp, + ADD geoFk int(11) DEFAULT NULL NULL AFTER companySize, + ADD CONSTRAINT supplier_zoneGeo_FK FOREIGN KEY (geoFk) + REFERENCES vn.zoneGeo(id) ON DELETE RESTRICT ON UPDATE CASCADE;