From fa53dcbf9dd8f5a32416c391300dfadb93e34ca9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Mon, 26 Feb 2024 13:57:56 +0100 Subject: [PATCH] =?UTF-8?q?feat:Agrupar=20DUA=20en=20funci=C3=B3n=20del=20?= =?UTF-8?q?transitario=20y=20pa=C3=ADs=20#6937?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../10912-brownCataractarum/00-firstScript.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 db/versions/10912-brownCataractarum/00-firstScript.sql diff --git a/db/versions/10912-brownCataractarum/00-firstScript.sql b/db/versions/10912-brownCataractarum/00-firstScript.sql new file mode 100644 index 000000000..51aea42a1 --- /dev/null +++ b/db/versions/10912-brownCataractarum/00-firstScript.sql @@ -0,0 +1,12 @@ +ALTER TABLE vn.country + MODIFY COLUMN code varchar(2) NOT NULL; + +ALTER TABLE vn.country + ADD CONSTRAINT country_unique UNIQUE KEY (code); + +ALTER TABLE vn.transitoryDuaUnified + ADD countryCodeFk varchar(2) DEFAULT 'EC' NOT NULL; + +ALTER TABLE vn.transitoryDuaUnified + ADD CONSTRAINT transitoryDuaUnified_country_FK FOREIGN KEY (countryCodeFk) + REFERENCES vn.country(code);