By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
create table wp_posts
(
ID bigint unsigned auto_increment
primary key,
post_author bigint unsigned default 0 not null,
post_date datetime default '0000-00-00 00:00:00' not null,
post_date_gmt datetime default '0000-00-00 00:00:00' not null,
post_content longtext not null,
post_title text not null,
post_excerpt text not null,
post_status varchar(20) default 'publish' not null,
comment_status varchar(20) default 'open' not null,
ping_status varchar(20) default 'open' not null,
post_password varchar(255) default '' not null,
post_name varchar(200) default '' not null,
to_ping text not null,
pinged text not null,
post_modified datetime default '0000-00-00 00:00:00' not null,
post_modified_gmt datetime default '0000-00-00 00:00:00' not null,
post_content_filtered longtext not null,
post_parent bigint unsigned default 0 not null,
guid varchar(255) default '' not null,
menu_order int default 0 not null,
post_type varchar(20) default 'post' not null,
post_mime_type varchar(100) default '' not null,
comment_count bigint default 0 not null
)
collate = utf8mb4_unicode_520_ci;
create index post_author
on wp_posts (post_author);
create index post_name
on wp_posts (post_name);
create index post_parent
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) VALUES (620, 1, '2020-09-15 10:58:48', '2020-09-15 10:58:48', '', 'Test', '', 'inherit', 'closed', 'closed', '', '619-revision-v1', '', '', '2020-09-15 10:58:48', '2020-09-15 10:58:48', '', 619, 'http://wp.test/2020/09/15/619-revision-v1/', 0, 'revision', '', 0);
select * from 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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
620 | 1 | 2020-09-15 10:58:48 | 2020-09-15 10:58:48 | Test | inherit | closed | closed | 619-revision-v1 | 2020-09-15 10:58:48 | 2020-09-15 10:58:48 | 619 | http://wp.test/2020/09/15/619-revision-v1/ | 0 | revision | 0 |
create table wp_icl_translations
(
translation_id bigint auto_increment
primary key,
element_type varchar(60) default 'post_post' not null,
element_id bigint null,
trid bigint not null,
language_code varchar(7) not null,
source_language_code varchar(7) null,
constraint el_type_id
unique (element_type, element_id),
constraint trid_lang
unique (trid, language_code)
)
collate = utf8mb4_unicode_520_ci;
create index id_type_language
on wp_icl_translations (element_id, element_type, language_code);
create index trid
on wp_icl_translations (trid);
INSERT INTO wp_icl_translations (translation_id, element_type, element_id, trid, language_code, source_language_code) VALUES (1, 'post_acf-field', 637, 637, 'en', null);
select * from wp_icl_translations
translation_id | element_type | element_id | trid | language_code | source_language_code |
---|---|---|---|---|---|
1 | post_acf-field | 637 | 637 | en | null |