Comments - Broken foreign key constraint

1 year, 4 months ago Mr C

OK, I think I've fixed it with:

SET FOREIGN_KEY_CHECKS=0;

alter table cri_Sample drop foreign key cri_Sample_ibfk_1;

ALTER TABLE cri_Sample ADD CONSTRAINT cri_Sample_ibfk_1 FOREIGN KEY (sampleType) REFERENCES cri_sample_type(type);

SET FOREIGN_KEY_CHECKS=1;

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.