1. Home
  2. Knowledge Base
  3. Problems (EN)
  4. Problems with upgrading to the 5.0 version running the migration script

Problems with upgrading to the 5.0 version running the migration script

It is possible that after running the migration script from 4.1 to 5 an error occurs regarding a table treport_content:

ERROR 1452 (23000) at line 266: Cannot add or update a child row: a foreign key constraint fails (`pandora`.<result 2 when explaining filename '#sql-867_1ba'>, CONSTRAINT `?sql?867_1ba_ibfk_1` FOREIGN KEY (`id_report_content`) REFERENCES `treport_content` (`id_rc`) ON DELETE CASCADE ON UPD)

If this occurs, you will have to execute this query in MySQL:

DELETE from treport_content_item WHERE id_report_content NOT IN (select id_rc from treport_content);

After this you have two options: to comment all lines to 265 and re-run the migration script, or to restore the  database using the backup that we should have done before, run the previous query and then execute the full migration script again.

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support

Recent Discussions