Although the drush output said that field_data% tables were migrated, they in fact didn't show up in the target database. So there are probably some tables that are silently failing or are ignored for some reason.

This was in a migration from mysql to sqlite, and it was a commerce kickstart database.

Comments

josh waihi’s picture

I haven't done enough investigation yet as to why this is happening. Halfdan wrote this:

I was experiencing a problem with all the field_data_field* tables not
being created - so I just threw in a check to see whether or not the
table is there :

   db_set_active($destination);
   $table_exists = db_query("SHOW TABLES LIKE '$table'")->fetchCol();
   if (empty($table_exists[0])) {
       db_create_table($table, $schema);
   }

This is just before the while loop in dbtng_migrator.batch.inc
Can't give you a nice git patch, since my diff is blowing up with
print_r statements for debug :)

This seems to work for MySQL, but obviously its not database agnostic code.

rfay’s picture

My experience was in Mysql-to-Sqlite.

Thanks for your excellent work on this. I think this is a huge win for the community.

josh waihi’s picture

Status: Active » Fixed

@rfay, I've pushed some a commit that looks to migrate the field_data% tables. I've tested it migrating from SQLite to PostgreSQL.

josh waihi’s picture

I've applied to make an offical project #1122454: DBTNG Migrator

rfay’s picture

Version: » 7.x-1.x-dev

Seems ok to me. Fields now survive.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.