由于无法找到从csv导入内容的任何工作方式,我决定将其从旧站点(数据库)导出到.csv,然后将其导入Drupal 8数据库。但是,在我更新了表node、node__body和node_field_data之后,我再也无法访问内容概述页面了。
发布于 2018-06-13 10:27:59
原来我还必须更新node_revision表,所以我所做的就是:
node (D7) -> node (D8)select nid,vid, 'article', UUID(), language from node where type = 'story'
field_data_body (D7) -> node_body (D8)select 'article', null, entity_id, revision_id, language, 0, body_value, body_summary, 'basic_html' from field_data_body where bundle = 'story'
node (D7) -> node_field_data (D8)select nid, vid, 'article', language, status, title, uid, created, changed, promote, sticky, 1, 1 from node where type='story'
node (D7) -> node_revision (D8)select nid, vid, language, created, uid, null, 1 from node where type='story'
node (D7) -> node_field_revision (D8)select nid, vid, language, status, title, uid, created, changed, promote, sticky, null, language from node where type='story'
当然,这些只是对一种特定的文章类型的简单查询,没有任何额外的字段,但重点是显示哪些表需要更新,以便至少获得Drupal 8中的内容。其他(字段)表将需要更复杂的SQL导出。
https://drupal.stackexchange.com/questions/263175
复制相似问题