function browscap_schema in Browscap 6
Same name and namespace in other branches
- 8.3 browscap.install \browscap_schema()
- 8 browscap.install \browscap_schema()
- 6.2 browscap.install \browscap_schema()
- 7.2 browscap.install \browscap_schema()
- 7 browscap.install \browscap_schema()
Implementation of hook_schema.
File
- ./
browscap.install, line 27 - Install, update and uninstall functions for the Browscap module.
Code
function browscap_schema() {
$schema['browscap'] = array(
'fields' => array(
'useragent' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'data' => array(
'type' => 'blob',
'size' => 'big',
),
),
'primary key' => array(
'useragent',
),
);
$schema['browscap_statistics'] = array(
'fields' => array(
'parent' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'counter' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'is_crawler' => array(
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
),
),
'primary key' => array(
'parent',
),
);
$schema['cache_browscap'] = array(
'fields' => array(
'cid' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'data' => array(
'type' => 'blob',
'size' => 'big',
),
'expire' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'created' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'headers' => array(
'type' => 'text',
),
'serialized' => array(
'type' => 'int',
'size' => 'small',
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'cid',
),
'indexes' => array(
'expire' => array(
'expire',
),
),
);
return $schema;
}