PMSE tables cleaning in database

Dear developpers,

I would like to make a cleaning for the executed BPM processes, is it enough to remove data from the table PMSE_INBOX or is there other table to cleanup ?

Additionnaly, I would do the same for the emails, I want to keep only one year of data, I identified the following tables : 

  • emails
  • emails_beans
  • emails_email_addr_rel
  • emails_text

What do you propose ? Did you face the same issue ? What is the best practice to make a safe cleanup / archiving ?

Thanks in advance,

Enes

Parents
  • For BPM pmse_inbox is surely not the only dynamic table which fills up, so you should look on all pmse_ tables and understand what they contain before you start to remove historic entries.

    For emails you found all relevant tables. Be careful because email_texts does not contain any timestamp. They are all related by the id of the emails table which is referenced as email_id in the other tables.

    For emails an additional module is important as all the attachments are saved in the notes module and uploaded as file to the upload directory. You find these notes by their field email_id which is set only for email attachments. If you delete the database record in the note table the linked file will be orphaned, so always use a V10 REST service to delete the note. The REST service removes the database entry and deletes the file from the upload directory.

    All in all for Emails the deletion by V10 REST calls is the best choice of all as all entries in all tables are set to deleted and the uploaded file is removed from the upload directory.

    Harald Kuske
    Principal Solution Architect – Professional Services, EMEA
    hkuske@sugarcrm.com
    SugarCRM Deutschland GmbH

Reply
  • For BPM pmse_inbox is surely not the only dynamic table which fills up, so you should look on all pmse_ tables and understand what they contain before you start to remove historic entries.

    For emails you found all relevant tables. Be careful because email_texts does not contain any timestamp. They are all related by the id of the emails table which is referenced as email_id in the other tables.

    For emails an additional module is important as all the attachments are saved in the notes module and uploaded as file to the upload directory. You find these notes by their field email_id which is set only for email attachments. If you delete the database record in the note table the linked file will be orphaned, so always use a V10 REST service to delete the note. The REST service removes the database entry and deletes the file from the upload directory.

    All in all for Emails the deletion by V10 REST calls is the best choice of all as all entries in all tables are set to deleted and the uploaded file is removed from the upload directory.

    Harald Kuske
    Principal Solution Architect – Professional Services, EMEA
    hkuske@sugarcrm.com
    SugarCRM Deutschland GmbH

Children