You are here

function taxonomy_image_schema in Taxonomy Image 5

Same name and namespace in other branches
  1. 6 taxonomy_image.install \taxonomy_image_schema()

Implementation of hook_schema().

File

./taxonomy_image.install, line 43
taxonomy_image.install Simple module for providing an association between taxonomy terms and images. Written by Jeremy Andrews <jeremy@kerneltrap.org>, May 2004.

Code

function taxonomy_image_schema() {
  $schema['term_image'] = array(
    'module' => 'Taxonomy Image',
    'description' => t('Mapping of term to image.'),
    'fields' => array(
      'tid' => array(
        'description' => t('Term identifier.'),
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'disp-width' => '10',
      ),
      'path' => array(
        'description' => t('File system path to the image.'),
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'tid',
    ),
  );
  $schema['cache_tax_image'] = array(
    'module' => 'Taxonomy Image',
    'fields' => array(
      'cid' => array(
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
        'default' => '',
      ),
      'data' => array(
        'type' => 'blob',
        'size' => 'big',
        'not null' => FALSE,
      ),
      'expire' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'disp-width' => '11',
      ),
      'created' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'disp-width' => '11',
      ),
      'headers' => array(
        'type' => 'text',
        'not null' => FALSE,
      ),
    ),
    'primary key' => array(
      'cid',
    ),
    'indexes' => array(
      'expire' => array(
        'expire',
      ),
    ),
  );
  return $schema;
}