I'm working on a custom migration from Drupal 6 to Drupal 8. Some of the content types have a field used for file attachments (field_attachments).
When I run the migration that connects the files to the nodes, I get this error.
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'title' cannot be null: INSERT INTO {node_field_data} (nid, vid, type, langcode, status, uid, title, created, changed, promote, sticky, default_langcode, revision_translation_affected) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11, :db_insert_placeholder_12); Array ( [:db_insert_placeholder_0] => 2064 [:db_insert_placeholder_1] => 3019 [:db_insert_placeholder_2] => forum [:db_insert_placeholder_3] => en [:db_insert_placeholder_4] => 1 [:db_insert_placeholder_5] => 0 [:db_insert_placeholder_6] => [:db_insert_placeholder_7] => 1558576761 [:db_insert_placeholder_8] => 1558576761 [:db_insert_placeholder_9] => 0 [:db_insert_placeholder_10] => 0 [:db_insert_placeholder_11] => 1 [:db_insert_placeholder_12] => 1 ) (/app/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php:847)
The migrate_plus.migration.custom_upload.yml file for the migration contains the following lines.
langcode: en status: true dependencies: { } id: custom_upload class: Drupal\migrate\Plugin\Migration field_plugin_method: alterFieldInstanceMigration cck_plugin_method: null migration_tags: - 'Drupal 6' - Content migration_group: custom label: 'File uploads' source: plugin: d6_upload process: nid: - plugin: get source: nid vid: - plugin: get source: vid langcode: - plugin: user_langcode source: language fallback_to_site_default: true type: - plugin: get source: type field_attachments: - plugin: sub_process source: upload process: target_id: plugin: migration_lookup migration: custom_file source: fid display: plugin: default_value default_value: 1 description: description destination: plugin: 'entity:node' migration_dependencies: required: - custom_file - custom_article - custom_forum From the error message, it appears that Drupal is trying to create a node; even though, I'm actually running the custom_upload migration after I ran the migration of all nodes.
I have migrated the nodes and the files already and I can see all the nodes in the database as well as the files in their directory and the database.
What am I missing?