By Fidel Carrera on Sunday, 16 April 2017
Posted in Technical Issues
Likes 0
Views 478
Votes 0
Hello,

I needed to purge a lot of my old conversation data but could not find an option to do so so I manually began deleting conversation data for conversations before 2017. Everything was going fine but now I am getting SQL errors on the site and the site is also crashing periodically.

Please help
If there is a way to maybe delete all messages it could fix it but I dont know how and I dont want to make any more mistakes
·
Sunday, 16 April 2017 22:46
·
0 Likes
·
0 Votes
·
0 Comments
·
My dev assisted me with this but I still need a way to get rid of all the old messages in a proper way so that i dont create any further issues.

Thanks guys
·
Monday, 17 April 2017 00:08
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Fidel Carrera,

To be honestly said, deleting old conversation is quite tedious to be done as it related to a few of table in database
Lets start a simple step to understands this:
1. When a conversation was created it involve these 4 table ( #_social_conversations_message, #_social_conversations, #_social_conversations_message_maps, #_social_conversations_participants)
2. Let we make an example to delete 1(one) conversation first. as user create an message in #_social_conversation will create/generate a row of data (refer img 1) with an conversation_id (for this example - 7) and some other data like message that has been typed, when it created and created_by(user that send the conversation)
3. In #_social_conversations table as well will create a row of data (refer img 2)
4. In #_social_conversations_message_maps will generate 2 row of data ( one for sender and receiver) with same conversation_id as no.2 (refer img 3)
5. And in #_social_conversations_participants it will also create 2 row of data (sender and receiver) (refer img 4)
So in order to delete a single conversation make sure you deleting the respective message in respective tables

P/S: We STRONGLY suggest you to BACKUP your site database in order to do these steps. Or do this on staging state first.
·
Monday, 17 April 2017 12:26
·
0 Likes
·
0 Votes
·
0 Comments
·
Awesome thanks!
·
Tuesday, 18 April 2017 20:40
·
0 Likes
·
0 Votes
·
0 Comments
·
You are most welcome Fidel
·
Tuesday, 18 April 2017 22:06
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post