-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathheisencache.install
51 lines (46 loc) · 1.24 KB
/
heisencache.install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
/**
* @file
* Heisencache installer: define the SQL Writer schema
*
* @author: Frederic G. MARAND <fgm@osinet.fr>
*
* @copyright (c) 2013-2014 Ouest Systèmes Informatiques (OSInet).
*
* @license General Public License version 2 or later
*/
use Drupal\heisencache\SqlWriterSubscriber;
#require_once __DIR__ . '/vendor/autoload.php';
/**
* Implements hook_schema().
*/
function Zheisencache_schema() {
$ret = array();
$ret[SqlWriterSubscriber::SINK] = array(
'description' => 'Stores raw Heisencache events par page cycle, not meant for direct consumption.',
'fields' => array(
'id' => array(
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => "The page cycle id",
),
'uid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'data' => array(
'type' => 'text',
// On MySQL, medium text only holds up to 16 MB.
// Some configurations may write more than this.
'size' => 'big',
'not null' => TRUE,
'description' => 'The event data in bulk, as observed by subscribers',
),
),
'primary key' => array('id'),
);
return $ret;
}