[Gdpdm-devel] Error in "div_allele_assay" table definition
Brought to you by:
tcasstevens
From: Ken Youens-C. <kc...@cs...> - 2005-11-15 16:50:42
|
Terry, I think there's an error in the table definition for "div_allele_assay." It's currently this: CREATE TABLE `div_allele_assay` ( `div_allele_assay_id` int unsigned NOT NULL auto_increment, `div_source_assay_id` int unsigned default NULL, `div_poly_type_id` int unsigned default NULL, `div_scoring_tech_type_id` int unsigned default NULL, `cdv_marker_id` int unsigned default NULL, `comments` text, `assay_date` datetime default NULL, `name` varchar(255) default NULL, `producer` varchar(255) default NULL, `position` varchar(255) default NULL, `ref_seq` text, `div_ref_stock_id` int unsigned default NULL, `length` int default NULL, PRIMARY KEY (`div_allele_assay_id`), KEY `div_source_assay_id` (`div_source_assay_id`), KEY `div_poly_type_id` (`div_poly_type_id`), KEY `cdv_marker_id` (`cdv_marker_id`), KEY `div_ref_stock_id` (`div_ref_stock_id`), KEY `assay_date` (`assay_date`), KEY `name` (`name`), KEY `div_scoring_tech_type_id` (`div_scoring_tech_type_id`), CONSTRAINT `div_aa_annotation_ibfk_3` FOREIGN KEY (`div_scoring_tech_type_id`) REFERENCES `div_scoring_tech_type` (`div_scoring_tech_type_id`), CONSTRAINT `div_allele_assay_ibfk_1` FOREIGN KEY (`div_source_assay_id`) REFERENCES `div_allele_assay` (`div_allele_assay_id`), CONSTRAINT `div_allele_assay_ibfk_2` FOREIGN KEY (`div_poly_type_id`) REFERENCES `div_poly_type` (`div_poly_type_id`), CONSTRAINT `div_allele_assay_ibfk_3` FOREIGN KEY (`cdv_marker_id`) REFERENCES `cdv_marker` (`cdv_marker_id`), CONSTRAINT `div_allele_assay_ibfk_4` FOREIGN KEY (`div_ref_stock_id`) REFERENCES `div_stock` (`div_stock_id`) ) ENGINE=InnoDB; I believe the error is with the FK constraint "div_allele_assay_ibfk_1" -- it references the table itself and it's PK. I believe that constraint should be dropped. ky |