langcode: en
status: true
dependencies:
  enforced:
    module:
      - farm_migrate
id: farm_migrate_plan
label: 'farmOS 1.x Plan Migration'
description: 'Migrates plans from farmOS 1.x to farmOS 2.x'
source_type: 'farmOS 1.x'
module: null
shared_configuration:
  destination:
    validate: true
  process:
    name:
      plugin: get
      source: name
    uid:
      -
        plugin: migration_lookup
        migration: farm_migrate_user
        source: uid
        no_stub: true
      -
        plugin: default_value
        default_value: 1
    created:
      plugin: get
      source: created
    changed:
      plugin: get
      source: changed
    status:
      plugin: static_map
      source: archived
      map:
        0: archived
        1: active
      default_value: archived
    notes:
      plugin: sub_process
      source: field_farm_notes
      process:
        value:
          plugin: get
          source: value
        format:
          plugin: static_map
          source: format
          map:
            farm_format: default
            plain_text: plain_text
          default_value: default
    file:
      plugin: sub_process
      source: field_farm_files
      process:
        target_id:
          plugin: migration_lookup
          migration:
            - farm_migrate_file
            - farm_migrate_file_private
          no_stub: true
          source: fid
        display: display
        description: description
    image:
      plugin: sub_process
      source: field_farm_images
      process:
        target_id:
          plugin: migration_lookup
          migration:
            - farm_migrate_file
            - farm_migrate_file_private
          no_stub: true
          source: fid
        alt: alt
        title: title
        width: width
        height: height
  migration_dependencies:
    required:
      - farm_migrate_file
      - farm_migrate_file_private
      - farm_migrate_user
    optional: {  }
