Commit 44bec681 authored by juampy's avatar juampy Committed by jmuzz
Browse files

Issue #2221407 by juampy: Force the creation of the table cache_entity_field_collection_item.

parent 10957df3
......@@ -280,3 +280,23 @@ function field_collection_update_7004() {
}
}
}
/**
* Force the creation of the table cache_entity_field_collection_item.
*
* entity_update_7003 will attempt to install entitycache tables for existing
* modules, but it uses module_list() to get the list of available modules,
* which, when called from a database update, may not return field_collection
* since drupal is bootstrapped at a lower level.
*/
function field_collection_update_7005() {
if (module_exists('entitycache')) {
$entity_type = 'field_collection_item';
$table = 'cache_entity_' . $entity_type;
if (!db_table_exists($table)) {
$schema = drupal_get_schema_unprocessed('system', 'cache');
$schema['description'] = 'Cache table used to store' . $entity_type . ' entity records.';
db_create_table($table, $schema);
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment