getDefinitions() as $entity_type => $entity_info) { if (!$entity_info->hasControllerClass('storage')) { continue; } $storage_controller = $entity_manager->getStorageController($entity_type); if (!($storage_controller instanceof FieldableDatabaseStorageController)) { continue; } $provider = $entity_info->getProvider(); $module = $module_handler->moduleExists($provider) ? $provider : 'system'; $tables = array(); $tables[] = $entity_info->getBaseTable(); foreach ($tables as $table) { $old_schema[$entity_type][$table] = drupal_get_schema_unprocessed($module, $table); } $new_schema[$entity_type] = $storage_controller->getSchema(); } recursive_ksort($old_schema); recursive_ksort($new_schema); file_put_contents('/tmp/old_schema.txt', var_export($old_schema, TRUE)); file_put_contents('/tmp/new_schema.txt', var_export($new_schema, TRUE)); exec('diff -up /tmp/old_schema.txt /tmp/new_schema.txt', $output); foreach ($output as $line) { print "$line\n"; }