Skift typen fra kolonnen idParent
til int(10) unsigned
. Så det er den samme type som den refererede kolonne idBC
.
DROP TABLE IF EXISTS `biological classification`;
CREATE TABLE `biological classification` (
`idBC` int(10) unsigned NOT NULL AUTO_INCREMENT,
`idParent` int(10) unsigned DEFAULT NULL,
`type` varchar(45) DEFAULT NULL,
`value` varchar(45) DEFAULT NULL,
PRIMARY KEY (`idBC`),
UNIQUE KEY `idnew_table_UNIQUE` (`idBC`),
CONSTRAINT `SelfKey` FOREIGN KEY (`idParent`) REFERENCES `biological classification` (`idBC`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=latin1 COMMENT='A table that contains the Biological Classification of anima';