XF 1.4 manually import dbtech thanks

Jake Bunce

XenForo moderator
Staff member
I am posting this here for reference.

This assumes you enabled the option during the import to preserve the source ids.

If you use the "dbtech thanks" addon in vB and you want to manually import those "thanks" as "likes" then run this query:

Rich (BB code):
INSERT INTO XFdbname.`xf_liked_content` (content_type, content_id, like_user_id, like_date, content_user_id)
	SELECT 'post', dbt.contentid, dbt.userid, dbt.dateline, post.userid
        FROM vBdbname.`dbtech_thanks_entry` AS dbt
        LEFT JOIN vBdbname.`post` AS post ON (post.postid = dbt.contentid)
ON DUPLICATE KEY UPDATE
        content_id = VALUES(content_id);
Then run this script:

https://xenforo.com/community/threa...t-profile-post-like-caches.42384/#post-457352
 

Donny

Active member
URLS need redirecting. You need an example?

Old domain.com/45-forum-category/565767-thread-title.html
New domain.com/threads/thread-title.75872/

etc
 

Donny

Active member
I am posting this here for reference.

This assumes you enabled the option during the import to preserve the source ids.

If you use the "dbtech thanks" addon in vB and you want to manually import those "thanks" as "likes" then run this query:

Rich (BB code):
INSERT INTO XFdbname.`xf_liked_content` (content_type, content_id, like_user_id, like_date, content_user_id)
    SELECT 'post', dbt.contentid, dbt.userid, dbt.dateline, post.userid
        FROM vBdbname.`dbtech_thanks_entry` AS dbt
        LEFT JOIN vBdbname.`post` AS post ON (post.postid = dbt.contentid)
ON DUPLICATE KEY UPDATE
        content_id = VALUES(content_id);
Then run this script:

https://xenforo.com/community/threa...t-profile-post-like-caches.42384/#post-457352
The old and new forums are on different databases. The same server and IP, just different databases. I wanted to start a complete fresh this time. The old forum had been on that DB for around 8 years and with various customisations over the years it was very messy.
 

murdercode

Active member
1. Keyword not recognized (near "KEY)
2. Unexpected Token (near "=")


on query:
Code:
INSERT INTO XFDB.'xf_liked_content' (content_type, content_id, like_user_id, like_date, content_user_id)
SELECT 'post', dbt.contentid, dbt.userid, dbt.dateline, post.userid
        FROM VBDB.'dbtech_thanks_entry' AS dbt
        LEFT JOIN VBDB.'post' AS post ON (post.postid = dbt.contentid)
ON DUPLICATE KEY UPDATE content_id = VALUES(content_id);
There's any angel can help me? :3
 

Iggy

Well-known member
has anything changed with this recently....i tried running the query....pretty sure i got all the prefixes and everything in properly...tried a couple ways to be sure but the best result was this error....running latest xen1.5 btw...hope thats not why......source vb4.2.5

ideas?

MySQL said: Documentation
#1048 - Column 'content_user_id' cannot be null
 
Last edited:

Iggy

Well-known member
:unsure:hmm not sure what that would be...it is a live database, havent had any issues there, can see all the dbtech likes everywhere...peeking into the content_user_id i can see values....some are zeros, but dont really understand why they wont import or how to resolve it
 
Top