我们在D7有一个基于有机组的门户网站,许多血库在那里添加记录。我们最近启动了Drupal 8迁移,并已接近完成。但是,我们希望首先将选择性血库添加到新的D8门户中,在要求所有其他血库使用新门户之前对其进行测试。
当新用户创建新记录时,是否可以设置更高的NID值?剩余客户的迁移数据可以无缝地进行,因为他们的NID值会更低。
谢谢。
发布于 2020-09-17 10:12:30
是的,您可以在nid
实例中将D8设置为更高的值,然后继续迁移该实例下的D7节点。
如下所示来设置auto_increment
值。
// Set the next auto increment field value on the table
$result = db_query('ALTER TABLE {' . $connection->escapeTable($table) . '} AUTO_INCREMENT = ' . (int)$auto_increment);
例如用于node
和node_revision
// Set the next auto increment field value on the node tables
$result = db_query('ALTER TABLE {node} AUTO_INCREMENT = 8000000');
$result = db_query('ALTER TABLE {node_revision} AUTO_INCREMENT = 8000000');
https://drupal.stackexchange.com/questions/296788
复制相似问题