puppi
New member
I think it would be brilliant to be able to import data to XenForo using raw sql instead of the migration tool.
My particular concern here to migrate from clunky VB 4 to slick XF 1.1
The reasons being that:
1) Migration tool is inevitably much slower than raw sql query
2) By using raw sql, one may avoids many php and webserver-specific pitfalls that might cause migration tool to fail (something that actually bugging me).
So I looked at the schemas and quickly put together these queries to migrate posts and threads:
Migrate posts:
migrate threads:
However, as for forums migration, I'm having difficulty because the table structure of the VB and XF diverge here and I'm by no means an expert in data migration.
Here are my (failed) attempted queries:
migrate forums:
I just need basic migration of forum->thread->post . Not fancy about thanks, profile etc. So If you have and share the queries or know how to fixed mine, I'd be greatful.
My particular concern here to migrate from clunky VB 4 to slick XF 1.1
The reasons being that:
1) Migration tool is inevitably much slower than raw sql query
2) By using raw sql, one may avoids many php and webserver-specific pitfalls that might cause migration tool to fail (something that actually bugging me).
So I looked at the schemas and quickly put together these queries to migrate posts and threads:
Migrate posts:
INSERT INTO xenforodb.xf_post (post_id, thread_id, user_id, username, post_date, message) SELECT
postid, threadid, userid, username, dateline, pagetext FROM vbdb.post;
migrate threads:
INSERT INTO xenforodb.xf_thread (thread_id, title, reply_count, view_count, user_id, username, post_date, sticky,
first_post_id, last_post_date, last_post_id, last_post_user_id, last_post_username) SELECT
threadid, title, replycount, views, postuserid, postusername, dateline, sticky, firstpostid, lastpost,
lastpostid,lastposterid, lastposter FROM vbdb.thread;
However, as for forums migration, I'm having difficulty because the table structure of the VB and XF diverge here and I'm by no means an expert in data migration.
Here are my (failed) attempted queries:
migrate forums:
INSERT INTO xenforodb.xf_node (node_id, title, description) SELECT forumid, title_clean, description_clean
FROM vbdb.forum;
===============
INSERT INTO xenforodb.xf_forum (node_id) SELECT forumid FROM vbdb.forum;
I just need basic migration of forum->thread->post . Not fancy about thanks, profile etc. So If you have and share the queries or know how to fixed mine, I'd be greatful.