Importing problem Example.php
-
Wordpress 4.9.6
bbPress 2.5.14http://www.personalgroupware.com/wilsonlogan/
Hi All,
I have a forum in SQLITE format and I want to import it into bbPress.
I decided that if I was going to have to convert to a MYSQL database, I might as well use the schema indicated in Example.php
As I didn’t *actually* have the schema, I had to *guess* based on the fields in Example.php
For example:
CREATE TABLE IF NOT EXISTS forums_table (
_bbp_old_forum_id int(10) NOT NULL default 0,
the_parent_id int(10) NOT NULL default 0,
the_topic_count int(10) NOT NULL default 0,
the_reply_count int(10) NOT NULL default 0,
the_total_topic_count int(10) NOT NULL default 0,
the_total_reply_count int(10) NOT NULL default 0,
the_forum_title varchar(150) NOT NULL default ‘ ‘,
the_forum_slug varchar(255) NOT NULL default ‘ ‘,
the_forum_description text NOT NULL,
the_forum_order int(10) NOT NULL default 0,
the_forum_type int(10) NOT NULL default 0,
the_forum_status int(10) NOT NULL default 0
);
Having created the database as it is in Example.php, all I needed to do was load the MYSQL database from my SQLITE database.
Job done!
Yeah? Not so fast…
The import fails here:
SELECT convert(topics_table.the_topic_id USING “utf8mb4”)
AS the_topic_id,convert(topics_table.the_topic_reply_count USING “utf8mb4”)
AS the_topic_reply_count,convert(topics_table.the_total_topic_reply_count USING “utf8mb4”)
AS the_total_topic_reply_count,convert(topics_table.the_topic_parent_forum_id USING “utf8mb4”)
AS the_topic_parent_forum_id,convert(topics_table.the_topic_author_id USING “utf8mb4”)
AS the_topic_author_id,convert(topics_table.the_topic_author_ip_address USING “utf8mb4”)
AS the_topic_author_ip_address,convert(topics_table.the_topic_content USING “utf8mb4”)
AS the_topic_content,convert(topics_table.the_topic_title USING “utf8mb4”)
AS the_topic_title,convert(topics_table.the_topic_slug USING “utf8mb4”)
AS the_topic_slug,convert(topics_table.the_topic_sticky_status USING “utf8mb4”)
AS the_topic_sticky_status,convert(topics_table.the_topic_creation_date USING “utf8mb4”)
AS the_topic_creation_date,convert(topics_table.the_topic_modified_date USING “utf8mb4”)
AS the_topic_modified_date,convert(replies_table.the_topic_id USING “utf8mb4”)
AS the_topic_id FROM topics_table AS topics_table INNER JOIN replies_table
AS replies_table USING replies_table.the_topic_id = topics_table.the_topic_id WHERE forums_table.the_topic_id = 0 LIMIT 0, 100Lookee thar… a mystery field!
forums_table.the_topic_id
Are there any other mandatory fields in the import schema that are not referenced in Example.php?
And… what field from my database should I load to forums_table.the_topic_id ?
Thanks!
- You must be logged in to reply to this topic.