ALTER TABLE AKUZ.T_APGAR_ASSESSMENT_OF_NEWBORN ALTER COLUMN "newborndevelopmenthistory" DROP NOT NULL;

ALTER TABLE AKUZ.T_APGAR_ASSESSMENT_OF_NEWBORN ADD "childregistration" uuid NULL;
ALTER TABLE AKUZ.T_APGAR_ASSESSMENT_OF_NEWBORN ADD CONSTRAINT FK_T_CHILD_REGISTRATION_T_APGAR_ASSESSMENT_OF_NEWBORN__BB8EA3B4
FOREIGN KEY("childregistration") REFERENCES AKUZ.T_CHILD_REGISTRATION (MovementID);

--

ALTER TABLE AKUZ.T_CHILD_REGISTRATION ADD "caesarean" boolean NULL;
UPDATE AKUZ.T_CHILD_REGISTRATION SET "caesarean" ='0';
ALTER TABLE AKUZ.T_CHILD_REGISTRATION ALTER COLUMN "caesarean" SET NOT NULL;

ALTER TABLE AKUZ.T_CHILD_REGISTRATION ADD "post" integer NULL;
ALTER TABLE AKUZ.T_CHILD_REGISTRATION ADD CONSTRAINT FK_T_POST_T_CHILD_REGISTRATION_Post
FOREIGN KEY("post") REFERENCES AKUZ.T_POST (ResourceID);