Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
So after fooling around with this module a bit, I realised I will probably need to write my own missing moduleUpgradePaths for things like content_profile (coming from a complicated D6 site).
Is there any documentation on howto add your own upgrade paths to this? What would be the best practice / recommended way to do this?
Comment | File | Size | Author |
---|
Comments
Comment #2
mikeryanI'm afraid we don't have specific documentation for this yet, just general docs on migration development, so let's make this the issue to add that documentation.
Besides the documentation, this is on my list of topics to blog about in the coming weeks. But for the meantime, your best bet is to learn from core - implementing a migration path for a contrib module is really no different than doing it for a core module. In this particular case, you're in luck - the migration path for content_profile will look a lot like the migration path for core profile values, the main difference being the queries to obtain the source data. So, in the core user module, look at:
If you get stuck, you can always pop a question or three into the #drupal-migrate IRC channel.
Comment #3
mikeryanComment #4
askibinski CreditAttribution: askibinski at Merge commented1. Thanks for the pointers! I managed to create a module which at least recognizes the plugin.
It doesn't really do much yet in terms of migration, but I think it's a start.
Created the sandbox with the module here: https://www.drupal.org/sandbox/merge/2612546
There is a lot of stuff copied from the core user module in /src there.
2. Using the module 'content_profile' is not yet anymore missing from the list of detected D6 modules, using the UI from migrate_upgrade.
However, I did have to patch the migrate_upgrade module to add my path in MigrateUpgradeForm.php:
I think there should be a better way to do this, and I think this is the issue for it:
#2568523: Standardize source module discovery mechanism
Comment #5
philipz CreditAttribution: philipz as a volunteer commentedI'm trying to implement a migration path from d6 module (emfield) to d8 (Video Embed Field).
The above comments are great starter for me but I'm wondering how could I test and rollback migrations during development.
I mean is there any control over migrate/upgrate like it is in D7 migrate (limit, rollback etc.) or do I have to just run the whole upgrade each time I make a change in code? :)
Comment #6
mikeryanFrom my recent blog post:
Comment #7
philipz CreditAttribution: philipz as a volunteer commented@mikeryan: Thanks for quick reply and all the work you're doing! :) I must have missed that part of the post somehow.
Comment #8
philipz CreditAttribution: philipz as a volunteer commentedI've managed to have some progress with migration of contrib module field but I would appreciate a lot any help or pointing me in the right direction :)
1. I've added my field to map in d6_field.yml migration template file. This resulted in field being created during node configuration migration.
2. I've run content type data migration and the field is populated with value from d6 site. This is done by the default get plugin which copies value column as I understand.
3. I've created MigrateProcessPlugin and MigrateCckField in the contrib module I'm trying to migrate. Those plugins are not picked up during migration.
Is there anything else I should set up to make the plugins work and copy the other field columns from source database?
I was following core link module so far but there's nothing more I can find inside of it...
Comment #9
benjy CreditAttribution: benjy at PreviousNext commentedHi philipz, is this for video_embed_field? Sam152 actually asked me to take a look at that and I intended to write it and document the process for other contrib authors but if you've already started, maybe you could share the code with me in a sandbox and we can do it together?
Comment #10
philipz CreditAttribution: philipz as a volunteer commentedSure, I would be happy to work together. I created an issue for this couple of days ago: #2623950: Write migration from Drupal 6 for Embedded Media Field
I don't have a sandbox for this yet and all the code I have is the patch I've uploaded already and minor change in core field migration templates.
I'll set up the sandbox and share it with you.
Comment #11
jhodgdonPlease lets keep this discussion about adding documentation for contrib maintainers. Thanks!
Comment #12
philipz CreditAttribution: philipz as a volunteer commentedComment #13
maryedith CreditAttribution: maryedith commentedHI, there, What is the latest on migrating Content Profile? I am working on a d6-d8 migration and will need to bring forward User data stored in Content Profile fields.
Thanks much for any info.
Comment #18
masipila CreditAttribution: masipila as a volunteer commentedI wrote a page for this topic, see https://www.drupal.org/docs/8/api/migrate-api/writing-migrations-for-con...
If you feel somethings is missing, please re-open this documentation task issue.
Cheers,
Markus