You are here

function paragraphs_ensure_entitycache_table in Paragraphs 7

Helper to ensure entitycache table.

3 calls to paragraphs_ensure_entitycache_table()
paragraphs_install in ./paragraphs.install
Implements hook_install().
paragraphs_modules_installed in ./paragraphs.module
Implements hook_modules_installed().
paragraphs_update_7102 in ./paragraphs.install
Make sure the entitycache table exists.

File

./paragraphs.module, line 1483
Paragraphs hooks and common functions.

Code

function paragraphs_ensure_entitycache_table() {
  if (module_exists('entitycache') && !db_table_exists('cache_entity_paragraphs_item')) {
    drupal_load('module', 'entitycache');
    $cache_schema = drupal_get_schema_unprocessed('system', 'cache');
    $cache_schema['description'] = 'Cache table used to store paragraphs_item entity records.';
    db_create_table('cache_entity_paragraphs_item', $cache_schema);
  }
}