Email address to entity relation table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Davide Alghi
    Junior Member
    • Sep 2024
    • 7

    Email address to entity relation table

    Version 9.0.7

    I post here this because I'm not sure it is a bug, but it could lead to orphan records.

    The entity_email_address table is not (fully) cleaned up: the column entity_email_address.deleted is not set to 1 when the email address/entity is deleted.

    If I remove the email address the record in entity_email_address is not marked as deleted and not deleted by CleanUp job.
    If I remove the the entity the entity_email_address record is not marked as deleted, but CleanUp job deletes it.

    NB: if I set by hand entity_email_address.deleted to 1, CleanUp job doesn't delete records.

    Is this the correct behavior?

  • yuri
    Member
    • Mar 2014
    • 8859

    #2
    Hi,

    I think it's correct. Email can be referenced somewhere else. Including in customizations. We don't have such a check.

    You can remove orphan email addresses manually. Administration > Email Addresses. Select the 'Orphan' filter.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • Davide Alghi
      Junior Member
      • Sep 2024
      • 7

      #3
      Hi Yuri, thanks for the reply.

      I am still learning EspoCRM.
      My goal was to delete all emails to have a clean situation to learn better.
      I deleted all emails and also all email addresses from "Administration > Email Addresses", but the entity_email_address table remains unchanged.

      Comment

      • yuri
        Member
        • Mar 2014
        • 8859

        #4
        I've tested (spent 20 minutes). Works fine. When a record removed, corresponding records from entity_email_address are removed by the cleanup job. There's a delay (months by default, but configurable).
        If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

        Comment

        • Davide Alghi
          Junior Member
          • Sep 2024
          • 7

          #5
          Yes, for me too.
          Maybe I didn't explain well.
          If I remove an entity (Account, Contact, User, ...) the corresponding record in entity_email_address table is removed by the Clean-up job.
          The same if I empty the Email field.
          A video to explain better.


          Comment

          Working...