How can I regenerate the entities generated by Drush? I get an error regarding the migration group existing. I would like to be able to just simply overwrite these.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | interdiff_9-10.txt | 5.78 KB | heddn |
| #10 | 2850309-10.patch | 4.84 KB | heddn |
Comments
Comment #2
mathieuhelie commentedI wanted to do exactly that for a dev workflow on migration templates.
The attached patch should update existing entities instead of triggering an exception.
Comment #3
mathieuhelie commentedComment #4
mikeryanCoding standards: else should be on a new line.
Is there a better way to replace an entity's values? In particular, it looks like if there's something in the existing entity which is not in the new array of values, it will not be removed.
Thanks!
Comment #5
mathieuhelie commentedRerolled the patch with reviewer comments.
Comment #6
heddnPatch no longer applies. It would also be a good thing to add a simple kernel test that tries to re-run the configure and reproduce this issue. We need more tests in this space.
Comment #7
rpayanmrerolled
Comment #8
heddnNeeds a re-roll again.
Comment #9
rpayanmComment #10
heddnA little code cleanup.
Comment #12
heddnThanks for all your contributions.
Comment #14
timwoodHello, Sorry to post this on a closed issue, but it seems related.
For whatever reason, I cannot get a repeat
drush migrate-upgrade --configure-onlycommand to match the existing migration prefix. My existing yml config files are for examplemigrate_plus.migration.upgrade_d7_block.ymlandmigrate_plus.migration.upgrade_system_site.yml. I presume from these filenames the migration prefix isupgrade_, but when I specify that prefix in my subsequent command, including my legacy db keydrush migrate-upgrade --legacy-db-key=migrate --configure-only --migration-prefix=upgrade_I get new config names like so:migrate_plus.migration.upgrade_upgrade_d7_block.ymlandmigrate_plus.migration.upgrade_upgrade_system_site.yml(notice the duplicate upgrade_). If I leave off the --migration-prefix option or set it to nothing I get new config names like this (no prefix):migrate_plus.migration.d7_block.ymlandmigrate_plus.migration.system_site.yml.Any idea how to get a repeat
migrate-upgrade --configure-onlycommand to match my existing migration configuration names?Comment #15
timwoodThe only way I can get this to work is to delete the existing migration group in the Drupal config at https://example.com/admin/structure/migrate and re-run the
drush migrate-upgrade --legacy-db-key=migrate --configure-only. Then rundrush cexand review the git diff for the changes I want to keep.Comment #16
juampynr commented@timwood I also faced the issue that you reported at #14 and created #3039544: migrate-upgrade keeps prefixing upgrade_ on subsequent runs to provide a fix.
Comment #17
juampynr commented