To Drupal 6
Last modified: April 3, 2009 - 02:52
Use phpMyAdmin to perform the following SQL. This requires both the PostNuke site and the new Drupal site to exist in the same MySQL server instance.
Note that the Drupal site must be a fresh one with no existing content or users. If you do have such then you will need to add an increment to the ID's to avoid conflicting index numbers.
Users: (assuming anon and admin are already present from the installation)
INSERT INTO www2.users (uid, name, pass, mail, signature, timezone, mode, sort, threshold, status, init, created, access, data, login) SELECT pn_uid, pn_uname, pn_pass, pn_email, pn_user_sig, 0, 0, 0, 0, 1, pn_email, pn_user_regdate, UNIX_TIMESTAMP('2007-01-01 01:01:01'), "N;", 0 FROM Phoenix.pn_users WHERE pn_uid!=1;News Items:
INSERT INTO www2.node (nid, vid, type, title, uid, status, created, comment, promote, moderate, changed)
SELECT pn_sid,pn_sid,"story",
CASE WHEN NOT strcmp(LEFT(pn_title,3),"_TP") THEN substring(pn_title,4) ELSE pn_title END,
pn_uid,1,unix_timestamp(pn_time),2,1,0,now()
FROM Phoenix.pn_stories s, Phoenix.pn_users u
WHERE s.pn_informant=u.pn_unameINSERT INTO www2.node_revisions (nid, vid, uid, title, teaser, body, log, timestamp, format)
SELECT pn_sid,pn_sid,pn_uid,pn_title,pn_hometext,pn_bodytext,"",now(),1
FROM Phoenix.pn_stories s, Phoenix.pn_users u
WHERE s.pn_informant=u.pn_unameComments:
INSERT INTO www2.comments ( cid, pid, nid, uid, subject, comment, hostname, timestamp, status, format, thread, name, mail, homepage)
SELECT c.pn_tid,c.pn_pid,c.pn_sid,
IF(strcmp(c.pn_name,""),u.pn_uid, 0) ,
c.pn_subject,c.pn_comment,c.pn_host_name,unix_timestamp(c.pn_date),
0,1,"01/",c.pn_name,c.pn_email,c.pn_url
FROM Phoenix.pn_comments c, Phoenix.pn_users u
WHERE c.pn_name=u.pn_unameINSERT INTO www2.node_comment_statistics ( nid, last_comment_timestamp, last_comment_name, last_comment_uid, comment_count)
SELECT pn_sid,UNIX_TIMESTAMP('2008-01-01 01:01:01'),"",0,pn_comments
FROM Phoenix.pn_stories
WHERE pn_sid > 1