First to say thanks to alexgr for this list!
Problems:
[1] In makes db, manufacturers 32-53 are duplicates, and this creates trouble when importing. If I delete the entire makes table, I can import newer without a problem, but then it is not complete, about first 31 manufacturers from original installation are missing, since the newer db start from 32. And if I try to delete rows 32-53, I get the following error:
Error
SQL query: Edit
DELETE FROM `osclass320`.`oc_t_item_car_make_attr` WHERE `oc_t_item_car_make_attr`.`pk_i_id` =32 LIMIT 1 ;
MySQL said:
#1451 - Cannot delete or update a parent row: a foreign key constraint fails (`osclass320`.`oc_t_item_car_model_attr`, CONSTRAINT `oc_t_item_car_model_attr_ibfk_1` FOREIGN KEY (`fk_i_make_id`) REFERENCES `oc_t_item_car_make_attr` (`pk_i_id`))
[2] And when I tried to delete entire models table, I could not do it because of a foreign key:
Error
SQL query: Edit
DELETE FROM `osclass320`.`oc_t_item_car_make_attr` WHERE `oc_t_item_car_make_attr`.`pk_i_id` =1 LIMIT 1 ;
MySQL said:
#1451 - Cannot delete or update a parent row: a foreign key constraint fails (`osclass320`.`oc_t_item_car_model_attr`, CONSTRAINT `oc_t_item_car_model_attr_ibfk_1` FOREIGN KEY (`fk_i_make_id`) REFERENCES `oc_t_item_car_make_attr` (`pk_i_id`))
If I untick foreign key check, it gets deleted allright, but when I import newer models database I get a new error about the foreign key:
Error
SQL query:
--
-- Constraints for dumped tables
--
--
-- Constraints for table `oc_t_item_car_model_attr`
--
ALTER TABLE `oc_t_item_car_model_attr` ADD CONSTRAINT `oc_t_item_car_model_attr_ibfk_1` FOREIGN KEY ( `fk_i_make_id` ) REFERENCES `oc_t_item_car_make_attr` ( `pk_i_id` ) ;
MySQL said:
#1452 - Cannot add or update a child row: a foreign key constraint fails (`osclass320`.`#sql-b8_121`, CONSTRAINT `oc_t_item_car_model_attr_ibfk_1` FOREIGN KEY (`fk_i_make_id`) REFERENCES `oc_t_item_car_make_attr` (`pk_i_id`))
How to properly import this into db?
Question: can we manually edit db in text editor, since the list looks very simple to me, and just rearange the data? Or is it not that simple/not recommended?