I'm trying to upgrade a system from 5.66.2 to 5.67.3 & this is the second problem I've had with this system, both to do with mailings. BTW this system was installed in 2013 and there have been a couple of problems where database settings have differed from more recent implementations.
Here's the error:
Type DB_Error
Code -3
Message DB Error: constraint violation
Mode 16
UserInfo UPDATE civicrm_mailing_event_queue q
INNER JOIN civicrm_mailing_job job ON job.id = q.job_id
SET q.mailing_id = job.mailing_id, q.is_test=job.is_test
WHERE q.id >= 31 AND q.id <= 267217 AND q.mailing_id IS NULL
[nativecode=1452 ** Cannot add or update a child row: a foreign key constraint
fails (`dcmadmin_civicrm`.`civicrm_mailing_event_queue`,
CONSTRAINT `civicrm_mailing_event_queue_ibfk_1`
FOREIGN KEY (`mailing_id`)
REFERENCES `civicrm_mailing` (`id`) ON DELETE SET NULL)]
Also this may be useful:
Civi\Core\Exception\DBQueryException: DB Error: constraint violation in
/home/dcmadmin/public_html/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php on line 945
- DB_Error: DB Error: constraint violation in unknown on line unknown.
Can anyone help, please?