Duplicate Subscriptions for Threads are not imported

markus68

Active member
Hi,
we went live yesterday with our forum after migration.

Users complain that all their "watched" threads were not imported. I admit, I did not test that :(.

Looking at the VB3-table "subscribethread":
1529829119033.webp

Looking at XFs "xf_thread_watch" they are very similar in structure:
1529829296108.webp

As I retained IDs during import, should I be able to just insert the old data ?

Thanks,
-Markus
 
Yep,
that looks like it :(.

I have not looked deeply at the importer-code. Would it be possible to run just this step (with your fix) or just do it the SQL way ?

Thanks,
-Markus
 
I've bulk-imported all subscriptions / watches with the following SQL query:

Code:
INSERT INTO xf_thread_watch SELECT userid, threadid, IF(emailupdate>0,1,0) FROM vb_subscribethread;

You can add "IGNORE" after "INSERT" if you already have possibly conflicting entries in xf_thread_watch.
 
Code:
INSERT INTO xfdb.xf_thread_watch SELECT userid, threadid, IF(emailupdate>0,1,0) FROM vbdb.vb_subscribethread;
This is the syntax to use if the XenForo forum is in a different database (xfdb) to the vBulletin forum (vbdb) :)


Fillip
 
Code:
INSERT INTO xfdb.xf_thread_watch SELECT userid, threadid, IF(emailupdate>0,1,0) FROM vbdb.vb_subscribethread;
This is the syntax to use if the XenForo forum is in a different database (xfdb) to the vBulletin forum (vbdb) :)


Fillip

Thanks for your help. Being not too savvy in SQL, I used phpmyadmin to create an import-sql that I tweaked manually. All good now.

-Markus
 
Top Bottom