After you get all the field data successfully migrated you will be left with a number of tables that are no longer needed that look like:

- content_field_
- content_type_

If you have tried and then rolled back some field migrations you will also end up with tables like these:

field_deleted_data_
field_deleted_revision_

It might be nice to provide a button to delete all these tables.

Comments

antiorario’s picture

I second that.

bryancasler’s picture

subscribe

Jody Lynn’s picture

Even an example script for deleting the right tables would be helpful.

Liliplanet’s picture

Yes, would love to know which tables we can drop pls ..

lots of tables for example ..

field_revision_taxonomy_vocabulary_x
field_revision_field_x
field_deleted_data_x

Jody Lynn’s picture

This got rid of my old cck tables post-upgrade:

drush  php-eval "\$tables = db_query('show tables like \'content_type_%\'')->fetchCol(); foreach (\$tables as \$table) {db_query('drop table ' . \$table);}"
drush  php-eval "\$tables = db_query('show tables like \'content_field_%\'')->fetchCol(); foreach (\$tables as \$table) {db_query('drop table ' . \$table);}"

So long as I don't roll back the tables I think I don't end up with the field_deleted_data tables.

codewatson’s picture

i think you can add "cache_content" to that list too cant you?

sdsheridan’s picture

Issue summary: View changes

Executing this little bit of code seems to work well:

$types = array('type_%', 'field_%', 'group', 'group_fields', 'node_field', 'node_field_instance');
foreach ( $types as $type ) {
  $tables = db_query("show tables like 'content_$type' ")->fetchCol(); 
  foreach ( $tables as $table) {
    print "dropping $table...\n";
    db_query('drop table ' . $table);
  }
}

Shawn