salix/db/versions/10912-brownCataractarum/00-firstScript.sql

13 lines
395 B
SQL

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);