Bulk config generation

Created on 14 October 2021, about 3 years ago
Updated 8 June 2023, over 1 year ago

Problem/Motivation

Sometimes it's tedious to run a lot of commands for each single field if you have a lot of entities/bundles/fields.

Steps to reproduce

Proposed resolution

A generator based on what MediaMigrateGenerator does, but that acts in bulk.

It may read a from a yml named files_media_relations.yml placed in the directory of module, that contain the definition of fields to be migrated, for example:

-
  entity: node
  bundles:
    -
      bundle: blog_post
      relations:
        -
          base_field_name: field_galeria_de_fotos
          source_media_type: image
          target_media_type: image
        -
          base_field_name: field_video
          source_media_type: file
          target_media_type: video

It can create the configurations for each field and also will assist with some tips for next steps.

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Closed: won't fix

Version

1.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain aleix

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡¦Ukraine HitchShock Ukraine

    Hi @aleix the solution is suitable for the custom module but not for the contrib cuz you have to update the yml file in the contib module which is not good.

    FYI. We have a plan to make a new submodule migrate_file_to_media_ui that will provide a lot of help features to simplify the configuration and migration process. In the context of this epic will be provided a way to configure what field must be migrated. We will create a new dev branch for that later - 2.1.x

  • πŸ‡ͺπŸ‡ΈSpain aleix

    That's fine, yes, I planned 2 years ago to improve this MR e.g. to take yml from other location than contrib module path. But If it will be easier, hands of keyboard...

    thank you !

Production build 0.71.5 2024