Details
Description
I think this is critical, because it is 'data loss' of a sort.
- You have sent a contact a mailing to 'email@example.com'
- On their contact record, there is '1 Mailing' displayed
- If you edit their email to email2@example.com there is still '1 Mailing' displayed
- If you delete their email address, '0 Mailing'
The same happens if you merge two contacts, and overwrite their primary email address (which triggers a delete on the email address that is overwritten).
This is due to a foreign key constraint and 'cascade' on delete function on the 'email_id' field in the civicrm_mailing_event_queue table.
On dev we tested removing the foreign key for email_id, and after deleting the email address the 'Mailings' for the contact stayed in tact.
Though there are probably several knock-on effects of simply deleting the FK?
–
Edit: This will probably happen for SMS etc with the FK on the phone_id column as well. So that should be deleted as well.
Attachments
Issue Links
- supplements
-
CRM-18526 CRM-18345 breaks upgrades
- Done/Fixed
- links to