Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.8] MyConversations: a conversation plugin for MyBB
#28
(2021-05-03, 07:11 AM)Laird Wrote: Yes, the old PM system is replaced, but MyConversations still relies on the old system's database tables to pull out preexisting message contents. I'm contemplating whether to support "full" migration, after which all rows in the old private messages table could be deleted, potentially saving a bunch of space.

Re the solution:

Currently, MyConversations considers to be "deleted" for an individual conversation participant any message with a folder ID of -1 (for that participant+message). These messages still exist in the database, and are still visible to other participants who haven't also "deleted" them, but they are no longer visible to the participant who "deleted" them. The easiest solution then is just to set to -1 the folder ID of imported messages for each participant for whom a copy of the original private message does not exist for them in the core private messages table.

I looked at the database structure and see how it has been done. Messages from prior to the conversion are still stored in privatemessages table. I can see the value of maintaining the old database intact for purposes of removing the conversations installation. Full conversion makes sense for a forum committed to the plugin. Full reversion might lose some detail.

I can go to Inbox or Sent or Trash folders and see new and old messages, and use built-in functions to move or delete. This is good. Then perhaps a task that finds messages where all recipients are folder -1 to delete the message from the db.

Just some numbers:
privatemessages 28041 records
cnv_conversations 5535 records
cnv messages 18097 records

privatemessages 20.5MB
all cnv_* 3.1MB

I suspect there will be a fair amount of space saved with full conversion, although not critical in the larger scheme of things in a 449MB database.

Yes it makes sense to assign folder -1 for participants who deleted previously. I'm confident we'll go to production with this one change. Task to purge deleted messages eventually. Full conversion or reversion is future path possibly.

[edited to collect thoughts]
Reply


Messages In This Thread
RE: MyConversations: a conversation plugin for MyBB - by HLFadmin - 2021-05-03, 01:27 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)