I have a Drupal 6.25 database that I’m trying to migrate to WordPress (v3.4.1). I’m able to copy the content into WordPress, but when it comes to comments, I seem to have trouble with converting the thread column (in Drupal comments table) to comment_parent (in WordPress wp_comments).
Here’s the code that I’m using (taken from a tutorial):
INSERT INTO `mywordpress`.wp_comments
(comment_post_ID, comment_date, comment_content, comment_parent, comment_author,
comment_author_email, comment_author_url, comment_approved)
SELECT DISTINCT
nid, FROM_UNIXTIME(timestamp), comment, thread, name,
mail, homepage, ((status + 1) % 2)
FROM mydrupal.comments;
The above doesn’t work since WordPress comment_parent is a BIGINT type while the Drupal thread column is a VARCHAR, with values such as 0a.01.03.00/,
How can these be transformed into WordPress compatible values?
You can try this query (I’ve taken it from this tutorial):