You are here

function boost_update_6119 in Boost 6

Update 6119 - Create boost_cache_relationships table

File

./boost.install, line 1291
Handles Boost module installation and upgrade tasks.

Code

function boost_update_6119() {
  $schema['boost_cache_relationships'] = array(
    'description' => t('Boost parent child relationships'),
    'fields' => array(
      'hash' => array(
        'description' => 'MD5 hash of the 7 these 7 items in the database',
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
      ),
      'base_dir' => array(
        'description' => 'Path of the cache root dir relative to Drupal webroot.',
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
        'default' => '',
      ),
      'page_callback' => array(
        'description' => 'The name of the parent function that renders the page.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'page_type' => array(
        'description' => 'The name of the parent content type.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '0',
      ),
      'page_id' => array(
        'description' => 'The ID of the parent page.',
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'default' => '',
      ),
      'child_page_callback' => array(
        'description' => 'The name of the child function that renders the page.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'child_page_type' => array(
        'description' => 'The name of the child content type.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '0',
      ),
      'child_page_id' => array(
        'description' => 'The ID of the child page.',
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'default' => '',
      ),
    ),
    'primary key' => array(
      'hash',
    ),
  );
  $ret = array();
  db_create_table($ret, 'boost_cache_relationships', $schema['boost_cache_relationships']);
  return $ret;
}