ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Resetting Private Messages data

August 21, 2013 8:51pm

Subscribe [2]
  • #1 / Aug 21, 2013 8:51pm

    arvinsim

    23 posts

    Is there a painless way to reset messages their related data?

    What I mean is to delete everything and clean up data and start with a clean slate, somewhat like what TRUNCATE does to a MySQL table.

    The reason I want to do this is to remove some bad data deliberately injected because of testing.

    Any ideas?

  • #2 / Aug 22, 2013 1:08am

    Bhashkar Yadav

    727 posts

    Hi Arvinsim,

    To clean up message data, you will need to TRUNCATE following database tables:

    exp_message_attachments
    exp_message_copies
    exp_message_data

    You can run following SQLs:

    TRUNCATE exp_message_attachments;
    TRUNCATE exp_message_copies;
    TRUNCATE exp_message_data;

    Also, EE stores number of private messages within exp_members database table (column private_messages). So you will need to run this SQL:

    UPDATE exp_members SET private_messages =0

    Please take a backup of database to avoid any other data problem.

    I hope, it would help you.

  • #3 / Aug 22, 2013 2:48am

    arvinsim

    23 posts

    Yep, exactly what I was looking for.

    Can you please post your answer here too? Some people might find this useful.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases