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

albertski created an issue. See original summary.

albertski’s picture

Actually just tried to do a drush migrate-import --update instead of rollingback and I got the same errors.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

mikeryan’s picture

Status: Active » Postponed (maintainer needs more info)

Is 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)?

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

heddn’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

If we can reproduce this, please re-open.