title: Magento. SQL error #1452 - Cannot add or update a child row: a foreign key constraint fails
body: <p>I'm trying to transfer Magento 1.8 CE to another server.
  Created a new database on the new server and trying to run SQL commands.
  I get the following error  </p>
  
  <pre><code>  -- Constraints for table `catalog_category_entity_datetime`
  -- 
  ALTER TABLE  `catalog_category_entity_datetime` ADD CONSTRAINT  `FK_CATALOG_CATEGORY_ENTITY_DATETIME_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (  `store_id` ) REFERENCES  `core_store` (  `store_id` ) ON DELETE CASCADE ON UPDATE CASCADE ,
  ADD CONSTRAINT  `FK_CAT_CTGR_ENTT_DTIME_ATTR_ID_EAV_ATTR_ATTR_ID` FOREIGN KEY (  `attribute_id` ) REFERENCES  `eav_attribute` (  `attribute_id` ) ON DELETE CASCADE ON UPDATE CASCADE ,
  ADD CONSTRAINT  `FK_CAT_CTGR_ENTT_DTIME_ENTT_ID_CAT_CTGR_ENTT_ENTT_ID` FOREIGN KEY (  `entity_id` ) REFERENCES  `catalog_category_entity` (  `entity_id` ) ON DELETE CASCADE ON UPDATE CASCADE ;
  
  
  MySQL said: 
  
  #1452 - Cannot add or update a child row: a foreign key constraint fails (`dhvision_dev`.`#sql-1838_18f5628`, CONSTRAINT `FK_CATALOG_CATEGORY_ENTITY_DATETIME_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCAD) 
  </code></pre>
  
  <p>I'm not quite sure what's the problem is. Can someone provide any suggestions?
  Detailed explanation in steps is appreciated.
  Thanks</p>