You are here

variable.install in Variable 7

Same filename and directory in other branches
  1. 6 variable.install
  2. 7.2 variable.install

Variable API module install file

File

variable.install
View source
<?php

/**
 * @file
 * Variable API module install file
 */

/**
 * Implements hook_schema().
 */
function variable_schema() {
  $schema['cache_variable'] = array(
    'description' => 'Cache table for variables.',
    'fields' => array(
      'cid' => array(
        'description' => 'Primary Key: Unique cache ID.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'data' => array(
        'description' => 'A collection of data to cache.',
        'type' => 'blob',
        'not null' => FALSE,
        'size' => 'big',
      ),
      'expire' => array(
        'description' => 'A Unix timestamp indicating when the cache entry should expire, or 0 for never.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'created' => array(
        'description' => 'A Unix timestamp indicating when the cache entry was created.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'serialized' => array(
        'description' => 'A flag to indicate whether content is serialized (1) or not (0).',
        'type' => 'int',
        'size' => 'small',
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'indexes' => array(
      'expire' => array(
        'expire',
      ),
    ),
    'primary key' => array(
      'cid',
    ),
  );
  return $schema;
}

/**
 * Implements hook_uninstall().
 */
function variable_uninstall() {
  variable_del('variable_module_list');
}

Functions

Namesort descending Description
variable_schema Implements hook_schema().
variable_uninstall Implements hook_uninstall().