Cambie el tipo de la columna idParent
a int(10) unsigned
. Por lo tanto, es del mismo tipo que la columna a la que se hace referencia 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';