• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Imported conversations

PeterT

Active member
#1
I am in the process of completing the setup of my imported MyBB forum.

I and other users have many many old private conversations, is there a way of deleting these en mass rather then clicking them one at a time and then clicking Leave Conversation.
 

Brogan

XenForo moderator
Staff member
#2
You can run a query/empty the table to delete them all, if you're comfortable doing so.
I would need to check which tables are involved, as there are several tables related to conversations.

I actually ran the query on my old (phpBB) forum before importing.
 

Brogan

XenForo moderator
Staff member
#4
I haven't tested this so please take a backup first and test it on your local installation.

There are 4 tables related to conversations so if you empty/truncate those, in theory it should work:

The tables are:
xf_conversation_master
xf_conversation_message
xf_conversation_recipient
xf_conversation_user

My good friend Jake also suggested you may need to run this query:
UPDATE xf_user SET conversations_unread = 0

You might need to run a cron task or update the cache afterwards but I shouldn't think so.

I'll do some testing on my local installation to see what the effect is.
 

Jake Bunce

XenForo moderator
Staff member
#5
I just did a quick test and these queries work for deleting all personal conversations. You can paste these queries into phpmyadmin:

Code:
TRUNCATE TABLE xf_conversation_master;
TRUNCATE TABLE xf_conversation_message;
TRUNCATE TABLE xf_conversation_recipient;
TRUNCATE TABLE xf_conversation_user;
UPDATE xf_user SET conversations_unread = 0;
Backup first just in case. My test was successful but I might have missed something.
 

kilcher

Active member
#10
Hopefully you warned people before deleting all of their private messages. :)

Mind sharing your link so that we can look at your new forum? :)
 

Eagle

Well-known member
#13
I just did a quick test and these queries work for deleting all personal conversations. You can paste these queries into phpmyadmin:

Code:
TRUNCATE TABLE xf_conversation_master;
TRUNCATE TABLE xf_conversation_message;
TRUNCATE TABLE xf_conversation_recipient;
TRUNCATE TABLE xf_conversation_user;
UPDATE xf_user SET conversations_unread = 0;
Backup first just in case. My test was successful but I might have missed something.
Thank you Jake.. But we will wait for another "older than X days" SQL Query :p
 
#14
I just did a quick test and these queries work for deleting all personal conversations. You can paste these queries into phpmyadmin:

Code:
TRUNCATE TABLE xf_conversation_master;
TRUNCATE TABLE xf_conversation_message;
TRUNCATE TABLE xf_conversation_recipient;
TRUNCATE TABLE xf_conversation_user;
UPDATE xf_user SET conversations_unread = 0;
Backup first just in case. My test was successful but I might have missed something.
Is this still good for xf 1.5 ?
 
#16
Hi,

How could I delete all conversations with the same title? I sent out a mass message and forgot to check the box for leaving the conversation. Now I have a ton of clutter. How can I just delete these completely?

Thanks!