Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I ran drush migrate-rollback --all
to rollback my migration. Once It finished I tried to re-migrate but I am getting the following error for every node:
[error] SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '484' for key 'PRIMARY': INSERT INTO {node} (nid, vid, type, uuid, langcode) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4); Array
(
[:db_insert_placeholder_0] => 484
[:db_insert_placeholder_1] => 484
[:db_insert_placeholder_2] => post
[:db_insert_placeholder_3] => 968fa3f4-0c02-44ec-a5b3-f4a4bdf91c0f
[:db_insert_placeholder_4] => und
)
(/var/www/mysite/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php:770)
I'm guessing somehow during the migration rollback it doesn't remove rows from the node table.
Comments
Comment #2
albertski CreditAttribution: albertski at Xeno Media, Inc. commentedActually just tried to do a drush migrate-import --update instead of rollingback and I got the same errors.
Comment #4
mikeryanIs there any more info you can provide? I have not seen any problem with rolling back and reimporting nodes. Are you mapping nid in your node migration (preserving a specific ID)?
Comment #6
heddnIf we can reproduce this, please re-open.