Migrating old and new wp_posts tables
-
Hello,
I have an old wp_post sql file and a new one and I need to migrate posts from both into a new wp_post sql to run in my database.
However I run into the error Column count doesn’t match value count at row 1
done
and I found that the OLD wp_post is:examples:
(2, 1, ‘2003-03-20 12:45:23’, ‘Sådär ja! Då har jag fått upp denna sajten!’, ‘Sajten uppe!’, 1, ”, ‘publish’, ‘open’, ‘open’, ”, NULL, NULL, ‘sajten-uppe’, ”, ”, ‘2011-08-16 11:15:50’, ”, ‘2003-03-20 16:45:23’, ‘2011-08-16 09:15:50’, 0, ‘/?p=2’, 0, ‘post’, ”, 1),
the new is:
(31874, 2, ‘2013-09-04 16:01:07’, ‘2013-09-04 14:01:07’, ‘Detta är ju sååååå gott! Underbart till plockbordet med lite salami, ostar etc. ‘, ‘Kokt kronärtskocka med dipp’, ”, ‘inherit’, ‘open’, ‘closed’, ”, ‘31856-revision-v1’, ”, ”, ‘2013-09-04 16:01:07’, ‘2013-09-04 14:01:07’, ”, 31856, ‘http://56kilo.se/31856-revision-v1/’, 0, ‘revision’, ”, 0);
What I noticed is that there are TWO timestamps in the new field. so that must be the reason why I get this error.
Any idea on how I can solve this??
Beside that this is in the beginning:
CREATE TABLE IF NOT EXISTS
wp_posts
(
ID
bigint(20) unsigned NOT NULL AUTO_INCREMENT,
post_author
bigint(20) unsigned NOT NULL DEFAULT ‘0’,
post_date
datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
post_date_gmt
datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
post_content
longtext NOT NULL,
post_title
text NOT NULL,
post_excerpt
text NOT NULL,
post_status
varchar(20) NOT NULL DEFAULT ‘publish’,
comment_status
varchar(20) NOT NULL DEFAULT ‘open’,
ping_status
varchar(20) NOT NULL DEFAULT ‘open’,
post_password
varchar(20) NOT NULL DEFAULT ”,
post_name
varchar(200) NOT NULL DEFAULT ”,
to_ping
text NOT NULL,
pinged
text NOT NULL,
post_modified
datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
post_modified_gmt
datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
post_content_filtered
longtext NOT NULL,
post_parent
bigint(20) unsigned NOT NULL DEFAULT ‘0’,
guid
varchar(255) NOT NULL DEFAULT ”,
menu_order
int(11) NOT NULL DEFAULT ‘0’,
post_type
varchar(20) NOT NULL DEFAULT ‘post’,
post_mime_type
varchar(100) NOT NULL DEFAULT ”,
comment_count
bigint(20) NOT NULL DEFAULT ‘0’,
PRIMARY KEY (ID
),
KEYpost_name
(post_name
),
KEYtype_status_date
(post_type
,post_status
,post_date
,ID
),
KEYpost_parent
(post_parent
),
KEYpost_author
(post_author
)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=31875 ;—
— Dumpning av Data i tabellwp_posts
—INSERT INTO
wp_posts
(ID
,post_author
,post_date
,post_date_gmt
,post_content
,post_title
,post_excerpt
,post_status
,comment_status
,ping_status
,post_password
,post_name
,to_ping
,pinged
,post_modified
,post_modified_gmt
,post_content_filtered
,post_parent
,guid
,menu_order
,post_type
,post_mime_type
,comment_count
) VALUESTIA!
- The topic ‘Migrating old and new wp_posts tables’ is closed to new replies.