Projet

Général

Profil

Paste
Télécharger (1,46 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / variable / variable.install @ ba09eb79

1 85ad3d82 Assos Assos
<?php
2
/**
3
 * @file
4
 * Variable API module install file
5
 */
6
7
/**
8
 * Implements hook_schema().
9
 */
10
function variable_schema() {
11
  $schema['cache_variable'] = array(
12
    'description' => 'Cache table for variables.',
13
    'fields' => array(
14
      'cid' => array(
15
        'description' => 'Primary Key: Unique cache ID.',
16
        'type' => 'varchar',
17
        'length' => 255,
18
        'not null' => TRUE,
19
        'default' => '',
20
      ),
21
      'data' => array(
22
        'description' => 'A collection of data to cache.',
23
        'type' => 'blob',
24
        'not null' => FALSE,
25
        'size' => 'big',
26
      ),
27
      'expire' => array(
28
        'description' => 'A Unix timestamp indicating when the cache entry should expire, or 0 for never.',
29
        'type' => 'int',
30
        'not null' => TRUE,
31
        'default' => 0,
32
      ),
33
      'created' => array(
34
        'description' => 'A Unix timestamp indicating when the cache entry was created.',
35
        'type' => 'int',
36
        'not null' => TRUE,
37
        'default' => 0,
38
      ),
39
      'serialized' => array(
40
        'description' => 'A flag to indicate whether content is serialized (1) or not (0).',
41
        'type' => 'int',
42
        'size' => 'small',
43
        'not null' => TRUE,
44
        'default' => 0,
45
      ),
46
    ),
47
    'indexes' => array('expire' => array('expire')),
48
    'primary key' => array('cid'),
49
  );
50
  return $schema;
51
}
52
53
/**
54
 * Implements hook_uninstall().
55
 */
56
function variable_uninstall() {
57
  variable_del('variable_module_list');
58
}