You are here

function seotools_schema in Drupal SEO Tools 6

Same name and namespace in other branches
  1. 7 seotools.install \seotools_schema()

Implementation of hook_schema

File

./seotools.install, line 22

Code

function seotools_schema() {
  $schema['seotools_cache'] = array(
    'description' => 'Creates database table to store keyword data.',
    'fields' => array(
      'cid' => array(
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
        'default' => '',
        'description' => 'cache id.',
      ),
      'data' => array(
        'type' => 'text',
        'description' => 'stores the cached data',
      ),
      'start_date' => array(
        'type' => 'char',
        'length' => '10',
        'not null' => TRUE,
        'default' => '',
        'description' => 'start date of query',
      ),
      'end_date' => array(
        'type' => 'char',
        'length' => '10',
        'not null' => TRUE,
        'default' => '',
        'description' => 'end date of query',
      ),
      'records' => array(
        'type' => 'int',
        'size' => 'small',
        'description' => 'number of records in data',
      ),
    ),
    'indexes' => array(
      'cid' => array(
        'cid',
      ),
      'start_date' => array(
        'start_date',
      ),
    ),
  );
  return $schema;
}