-- Tables

-- Alters

ALTER TABLE AKUZ.T_CDA_SECTION_PREGNANCY_CHILDBIRTH ADD "addressliving" uuid NULL;

ALTER TABLE AKUZ.T_CDA_SECTION_PREGNANCY_CHILDBIRTH ADD "addressregistry" uuid NULL;

ALTER TABLE AKUZ.T_CDA_SECTION_PREGNANCY_CHILDBIRTH ADD CONSTRAINT FK_T_PATIENT_ADDRESS_T_CDA_SECTION_PREGNANCY_CHILDBIRT_C53EE466
FOREIGN KEY("addressliving") REFERENCES AKUZ.T_PATIENT_ADDRESS (AddressID);

ALTER TABLE AKUZ.T_CDA_SECTION_PREGNANCY_CHILDBIRTH ADD CONSTRAINT FK_T_PATIENT_ADDRESS_T_CDA_SECTION_PREGNANCY_CHILDBIRT_3BC1E555
FOREIGN KEY("addressregistry") REFERENCES AKUZ.T_PATIENT_ADDRESS (AddressID);


ALTER TABLE AKUZ.T_CDA_SECTION_PREGNANCY_CHILDBIRTH ALTER COLUMN "region_living" DROP NOT NULL;
ALTER TABLE AKUZ.T_CDA_SECTION_PREGNANCY_CHILDBIRTH ALTER COLUMN "address_living" DROP NOT NULL;
ALTER TABLE AKUZ.T_CDA_SECTION_PREGNANCY_CHILDBIRTH ALTER COLUMN "region_registry" DROP NOT NULL;
ALTER TABLE AKUZ.T_CDA_SECTION_PREGNANCY_CHILDBIRTH ALTER COLUMN "address_registry" DROP NOT NULL;

