I'm trying to migrate a Drupal 6.3.8 website to Drupal 8.1.0, and after running the migration process, I have 178 database tables in my Drupal 8 database that begin with the names "migrate_map" and "migrate_message". I've looked at some of them so far, and some are empty, and some have data in them.
A few questions:
* Should these tables have been cleaned up (deleted) after the migration process finished?
* If not, can I delete the empty tables?
It seems like the migration process finished okay, though there are 27 errors like this in the reports:
Source ID node,teaser,source_code,field_source_tags: Failed to lookup field type array ( 0 => 'content_taxonomy', 1 => 'link', ) in the static map.
There are a couple of errors related to menus as well, like this:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'aa_d6.menu_custom' doesn't exist: SELECT COUNT(*) AS expression FROM (SELECT 1 AS expression FROM @menu_custom m) subquery; Array ( )
I'll be glad to provide any information you need on this. I'm using MAMP 3.5 on a Mac OS X system, and the Drupal 6.38 site has a little over 7,000 nodes and 18,000 URL aliases.
If the image attachment works, it shows some of the table names that are left over.
Comment | File | Size | Author |
---|---|---|---|
drupal_migrate-tables.jpg | 187.53 KB | alvinalexander |
Comments
Comment #2
xeM8VfDh CreditAttribution: xeM8VfDh commented+1
I am also interested in knowing the answer to this. After a successful migration, when one knows that they won't be doing any more migrations, is it okay to drop all migrate_* tables.
Comment #3
mikeryanThe tables absolutely should remain after running a migration process - the migrate_message tables are necessary for diagnosing any problems that may have occurred during migration, and the migrate_map tables are necessary to permit rolling back a migration or running incremental (delta) migrations after the initial bulk migration.
A related question is whether the tables should be removed when uninstalling the migrate module - there's an existing issue for that: #2713327: Provide a way to remove migration tables (ID map etc.).
Comment #4
xeM8VfDh CreditAttribution: xeM8VfDh commented@mikeryan, thanks for the feedback. However, lets say that my migration went well, I've done all of my cleanup, no more migrations/rollbacks will be performed, and I am moving forward without any further need for the migration functionalities. In that scenario, would it be okay to deactivate/uninstall the Migrate Upgrade module, then drop all of those tables? Thanks again.
Comment #5
mikeryanYes, the expectation is that you will disable the migration modules once you're done with them. Unless/until #2713327: Provide a way to remove migration tables (ID map etc.) is addressed, you can safely drop the tables.
Comment #6
xeM8VfDh CreditAttribution: xeM8VfDh commentedThanks mikeryan for confirming that
Comment #8
davidwhthomas CreditAttribution: davidwhthomas commentedJust noting, after a completed migration, uninstalling the migrate modules doesn't appear to delete the
migrate_%
tables in the database. They need to be manually deleted after that.Probably a few ways to do it, but here's a sample
.install
file update hook to remove them:Comment #9
phuang07 CreditAttribution: phuang07 as a volunteer commentedFor Drupal 9:
Comment #10
cewernlund CreditAttribution: cewernlund as a volunteer commentedJust wanted to bump for relevance and appreciate the Drupal 9 syntax for clearing the tables mentioned in #9