How do I migrate file uploads? 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] =&gt; 2064 [:db_insert_placeholder_1] =&gt; 3019 [:db_insert_placeholder_2] =&gt; forum [:db_insert_placeholder_3] =&gt; en [:db_insert_placeholder_4] =&gt; 1 [:db_insert_placeholder_5] =&gt; 0 [:db_insert_placeholder_6] =&gt; [:db_insert_placeholder_7] =&gt; 1558576761 [:db_insert_placeholder_8] =&gt; 1558576761 [:db_insert_placeholder_9] =&gt; 0 [:db_insert_placeholder_10] =&gt; 0 [:db_insert_placeholder_11] =&gt; 1 [:db_insert_placeholder_12] =&gt; 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?
Your custom_upload migration is trying to create nodes; the custom_upload migration is taking a d6_upload source plugin:

source:
  plugin: d6_upload


...and mapping it to a node:entity destination plugin:

destination:
  plugin: 'entity:node'


Since the d6_upload source doesn't have a title field to map to the node:entity field in the process definition of your migration, the migration fails as it tries to insert a titleless node.

You need update your node migration. If your node/file migrations are working, the node migration should have a 
process.field_attachments yml property to map field_attachments.target_id to the fid property from your custom_file migration.