- 🇳🇿New Zealand quietone
The patch still applies.
I am setting to Needs Review and noting that @benjifisher commented in #44 ✨ Provide a way to remove migration tables (ID map etc.) Needs work that he was going to add some more suggestions. Still, others can add reviews if they wish.
For those who do migrations via Drush, adding a Drush command to remove a migration table might be helpful. Otherwise, it is always possible to execute a DROP TABLE command in SQL via Drush.
- 🇮🇳India bhanu951
For anyone who want to drop all migrate tables in one go, here is a command to do it
drush sqlq --extra='-ss' "show tables like 'migrate_%'" | sed -r '/^\s*$/d' | while read TABLE ; do echo "drush sqlq 'DROP TABLE $TABLE;'" ; done
credits to @xurizaemon on slack
This command is dangerous and use it only if you know what you are doing. IT WILL DROP ALL MIGRATE TABLES.
- last update
over 1 year ago 30,370 pass - Status changed to Needs work
over 1 year ago 2:23pm 28 September 2023 - 🇺🇸United States mikelutz Michigan, USA
Moving this back to NW, as it definitely needs some work. I'm also not sold on putting this in the migrate module. I feel like for core, We should add an option in migrate drupal UI to remove tables when done. We might also add a drush command to the core migrate drush commands to remove the tables. As far as a UX like this to remove all migration tables, I think it should live in migrate_tools. I'm hesitant to add any UX to the api module directly, I'm a fan of keeping that purely api. Outside of the migrate_drupal_ui, the migrate api requires migrations to be run through drush, migrate_tools UX, or custom code, and I feel like those are the places where table removal should happen. The api module should only provide an api method of removing the tables, which it does through MigrateIdMapInterface::destroy()
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Ran into this again while migrating my own site. At minimum this needs clear documentation.
The
migrate_tools
issue that #159 refers to ( ✨ Provide a drush wrapper to destroy/delete migration tables Needs work ) has not progressed either, which is why I propose a pragmatic docs-only solution for core.The Drupal 7 EOL is in a few days, so many more people are bound to run into this very soon 😅
- 🇩🇰Denmark ressa Copenhagen
Until a Drush command or UI is ready, a documentation page with a solution on how to clean up migrate tables after upgrading from Drupal 7 to Drupal 10 would be great.
I have updated After the upgrade → , linking to this issue and ✨ Provide a drush wrapper to destroy/delete migration tables Needs work , adding a Cleaning up, delete migration tables → section.
This page could also include a solution on how to take care of old, lingering blocks in configuration, as seen in #2694895: Single item import fails with validation errors from other config → , so I have added a section Clean up orphaned blocks from a deleted theme → .
Ideally, both "Cleaning up, delete migration tables" and "Clean up orphaned blocks from a deleted theme" should contain solutions, and not just link to these issues, and anyone should feel free to add them to that doc page.