Improve documentation regarding core vs this module

Created on 29 October 2023, about 1 year ago

Problem/Motivation

I just ran into a confusing situation which I only understood after looking into the code.

The goal is to migrate a Drupal 7 website to Drupal 10.

I started with the core migrate UI.
This creates migrations named like `d7_node_complete__blog`.
It also created some migrate map tables like `migrate_map_d7_node_complete__blog`.
These tables were filled with records, and the entities were created in the D10 database.

I noticed that I need a few additional modules to get a more complete migration, e.g. for views.
Then I started over, this time using the command from migrate_upgrade.
The hope was to simply add anything that was missing from the previous attempt.

However, thanks to the automatic prefix, new migrations were created, instead of reusing the existing ones.
The new migrations are named like `upgrade_d7_node_complete_blog`.
So I kept wondering why migrate:status reports everything as "not imported", when the migrate map tables were already filled.

Steps to reproduce

Start with a core migration from D7.
Then install this module and run `migrate:upgrade`.

Proposed resolution

I think all we need is some documentation.

Maybe this issue can already be enough :)

I think I am still scratching the surface here, so I cannot give a complete explanation at this moment.
But if I understand better what is going on, I might post a reply here with more info.

Remaining tasks

User interface changes

API changes

Data model changes

💬 Support request
Status

Active

Version

3.0

Component

Documentation

Created by

🇩🇪Germany donquixote

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

Comments & Activities

  • Issue created by @donquixote
  • 🇩🇪Germany donquixote

    Ok, so here is the explanation.

    The migrate_drupal module from Drupal core registers migrations as plugins, but not as config entities.
    The migrate_plus module provides the possibility to register migrations as config entities.
    The migrate:upgrade command in migrate_tools module creates new config entities based on the migrations from migrate_drupal in core, but with a prefix on the id.

    To avoid running all the migrations from scratch, I suppose we can rename the migrate_map_* and migrate_message_* tables, to add the prefix and replace the '__' with '_',
    I am not sure yet which impact this will have. I will try.

Production build 0.71.5 2024