I'm working on migration from an old Drupal 8 site to new Drupal 9 site:
I developed a source plugin to get data from D8 database:
My migration works, but it doesn’t migrate all my contents and get this error:
Drupal\Core\Database\IntegrityConstraintViolationException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '8a7e1ba8-9b75-4813-80d6-99104c82efa5' for key 'node_field__uuid__value': INSERT INTO {node} ("vid", "type", "uuid", "langcode") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3); Array
When I debug the issue and I have found that there is some translated nodes have the same nid vid only langcode is different like the example bellow.
I added the langcode as id in my source plugin but it doesn't help:
public function getIds() {
return [
'nid' => [
'type' => 'integer',
'alias' => 'n',
],
'langcode' => [
'type' => 'string',
'alias' => 'n',
],
];
}
How can i migrate those nodes ?
Used modules: Migrate/ Migrate plus / Migrate Tools .
Drupal Version : 9.0.3