Re: restore from mysqldump --all-databases fails with "cannot add foreign key constraint"
Posted by: Didier Wiroth
Date: March 14, 2013 09:56AM

Here is the statement that fails:

--
-- Table structure for table `admission_condition_instance`
--

DROP TABLE IF EXISTS `admission_condition_instance`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_condition_instance` (
`PK_ACI_NUM_ID` bigint(20) NOT NULL AUTO_INCREMENT,
`ACI_COMMENT` varchar(512) DEFAULT NULL,
`ACI_DISPLAY_ORDER` int(11) NOT NULL,
`PK_ADC_NUM_ID` bigint(20) NOT NULL,
`PK_TRA_NUM_ID` bigint(20) NOT NULL,
PRIMARY KEY (`PK_ACI_NUM_ID`),
UNIQUE KEY `PK_ACI_NUM_ID` (`PK_ACI_NUM_ID`),
KEY `FK8827F6FEE647675` (`PK_ADC_NUM_ID`),
KEY `FK8827F6F21E214DA` (`PK_TRA_NUM_ID`),
CONSTRAINT `FK8827F6F21E214DA` FOREIGN KEY (`PK_TRA_NUM_ID`) REFERENCES `training` (`PK_TRA_NUM_ID`),
CONSTRAINT `FK8827F6FEE647675` FOREIGN KEY (`PK_ADC_NUM_ID`) REFERENCES `admission_condition` (`PK_ADC_NUM_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

Options: ReplyQuote


Subject
Written By
Posted
Re: restore from mysqldump --all-databases fails with "cannot add foreign key constraint"
March 14, 2013 09:56AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.