ALTER TABLE AKUZ.T_CDA_RESLAB_ONKO_CHILD ADD COLUMN "cdareslabonkochildid" uuid NOT NULL;

ALTER TABLE AKUZ.T_CDA_RESLAB_ONKO_CHILD ADD CONSTRAINT PK_T_CDA_RESLAB_ONKO_CHILD
PRIMARY KEY (CdaReslabOnkoChildID);

ALTER TABLE AKUZ.T_CDA_LAB_PARAMETER_ONKO 
  DROP CONSTRAINT IF EXISTS FK_T_CDA_RESLAB_ONCO_CHILD_T_CDA_LAB_PARAMETER_ONKO_CdaReslabOnkoChild;
  
ALTER TABLE AKUZ.T_CDA_MED_SERVICE_ONKO 
  DROP CONSTRAINT IF EXISTS FK_T_CDA_RESLAB_ONCO_CHILD_T_CDA_MED_SERVICE_ONKO_CdaReslabOnkoChild;
  
ALTER TABLE AKUZ.T_CDA_SAMPLE_INFO_ONKO 
  DROP CONSTRAINT IF EXISTS FK_T_CDA_RESLAB_ONCO_CHILD_T_CDA_SAMPLE_INFO_ONKO_CdaReslabOnkoChild;
  
ALTER TABLE AKUZ.T_CDA_SAMPLE_INFO_ONKO ADD CONSTRAINT FK_T_CDA_RESLAB_ONKO_CHILD_T_CDA_SAMPLE_INFO_ONKO_CdaReslabOnkoChild
FOREIGN KEY("cdareslabonkochild") REFERENCES AKUZ.T_CDA_RESLAB_ONKO_CHILD (CdaReslabOnkoChildID);

ALTER TABLE AKUZ.T_CDA_LAB_PARAMETER_ONKO ADD CONSTRAINT FK_T_CDA_RESLAB_ONKO_CHILD_T_CDA_LAB_PARAMETER_ONKO_CdaReslabOnkoChild
FOREIGN KEY("cdareslabonkochild") REFERENCES AKUZ.T_CDA_RESLAB_ONKO_CHILD (CdaReslabOnkoChildID);

ALTER TABLE AKUZ.T_CDA_MED_SERVICE_ONKO ADD CONSTRAINT FK_T_CDA_RESLAB_ONKO_CHILD_T_CDA_MED_SERVICE_ONKO_CdaReslabOnkoChild
FOREIGN KEY("cdareslabonkochild") REFERENCES AKUZ.T_CDA_RESLAB_ONKO_CHILD (CdaReslabOnkoChildID);