Hello,
I am trying to migrate a fully published issue from one OJS portal to another OJS portal.
Environment
- OJS Version: 3.4.0-9 (same version on both source and destination portals)
- Database: MySQL
- Migration type: Import by Native XML Plugin
Error encountered during import
During the import of the issue, the process fails with the following database error:
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`ojs34`.`publications`, CONSTRAINT `publications_primary_contact_id` FOREIGN KEY (`primary_contact_id`) REFERENCES `authors` (`author_id`) ON DELETE SET NULL) (SQL: update `publications` set `access_status` = 0, `date_published` = 2025-06-20, `last_modified` = 2026-01-15 09:20:16, `primary_contact_id` = 0, `section_id` = 264, `seq` = 1, `submission_id` = 174357, `status` = 3, `url_path` = ?, `version` = 1, `doi_id` = 20827 where `publication_id` = 151863)
- The error is caused by
primary_contact_id = 0 - In the destination database, there is no author with
author_id = 0
Any guidance, best practices, or references would be highly appreciated.