schema_fields_sql empty on entity_get_info I'm trying to debug why Drupal Commerce License Billing isn't working on existing install but works fine on fresh install.

The difference I can see between the two when adding a new billing type is after entity_get_info is ran (after saving a new type) the clean install has two array elements complete the existing install does not.

Those two elements are "base table field types" and "schema_fields_sql". 

So for some reason those elements aren't set in the existing install.

Any ideas why those elements wouldn't be populated or where they are set so I can further debug?

Thanks
My first guess would be that the cache is somehow corrupted. To fix that you'll need to clear the drupal caches

If that doesn't help you'll need some more in-depth debugging.

For further debugging you'll need some easy way to execute code in your drupal environment. I'd suggest to use drush ev or drush php-script for that. -- Here is some information on how to install drush if you don't have it installed already.

At this point I think there are only two causes left:


entity_get_info() only populates schema_fields_sql if the base table key is present. So it might by that somehow the base table is not set. To check that take a look at the return value of module_invoke_all('entity_info'). For debugging you'll need to take a look at all modules in module_implements('entity_info').
If the original data in module_invoke_all('entity_info') includes a base table the only other way to corrupt the information is some implementation of hook_entity_info_alter(). Use module_implements('entity_info_alter') to find all modules you need to check.


If you need further help please provide at least the dump of entity_get_info() and module_invoke_all('entity_info').