Private message migration are not happening, Rails console getting hanged

AI-generated summary

Private Message Migration Issue

domainghost is experiencing issues migrating private messages from SMF to Discourse. Despite successfully migrating other data, the script hangs when trying to create posts. They’ve attempted to insert data one by one and using arrays, but the issue persists.

domainghost is using the smf2.rb script but has found that it lacks a method for private messages, prompting them to attempt the migration via Rails console.

pfaffman has suggested sharing the code and details of the issue to better understand the problem. He also recommends exploring the import scripts for PMs as a potential solution.

pfaffman has advised against using the Rails console for the migration, citing it as error-prone. Instead, he suggests using the smf1 script as a model to rewrite the PM import function for smf2, which may involve modifying the SQL query to retrieve the required data.

I am trying to migrate private message from smf to discourse and all the data are migrated, only pending is private message. so i have written external script for private message but when i am running the script topics are created but when its trying to create post its getting hanged every time, can anyone help me on this issue.
I have tried to insert data one by one by using create but when i got error then tried using array like, First I am storing all the data to an array and then i am inserting that array to database but then also system got hanged once array are creating.
It will be immense help if anyone can help me to get rid of this problem.
Thanks in advance!!

You would need to share your code and say what’s happening and what you would expect that’s different.

Did you create some other script or did you look at the import scripts for one that imports pms and use that for a model?

Hey @pfaffman I am using smf2.rb but in that script no method are written for private message. So i am doing that from rails console. Can you please tell me, if i will be able to use smf1 private message method anyhow?

That sounds painful and error prone.

If the smf1 script imports PMs then you can use that as a model to re-write that function for smf2. It’s probably mostly a matter of changing the SQL query to get the required data. If you need help and have a budget, my contact info is in my profile