-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgrabber.install
94 lines (90 loc) · 2.69 KB
/
grabber.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?php
/**
* @file
* Schema definitions install/update/uninstall hooks.
*/
/**
* Implement hook_uninstall()
*/
function grabber_uninstall() {
//variable_del('variable_del');
//variable_del('grabber_cron_last_run');
}
/**
* Implements hook_schema().
*/
function grabber_schema() {
$schema = array();
$schema['grabber_log'] = array(
'description' => 'Table that contains logs of grabber events.',
'fields' => array(
'id' => array(
'type' => 'serial',
'not null' => TRUE,
'description' => 'Primary Key',
),
'sid' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => 'Unix timestamp - session id.',
),
'created' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => 'Unix timestamp of when event occurred.',
),
'type' => array(
'type' => 'varchar',
'length' => 64,
'not null' => TRUE,
'default' => '',
'description' => 'Type of log message: info, error',
),
'message' => array(
'type' => 'text',
'not null' => FALSE,
'size' => 'big',
'description' => 'Text of log message.',
),
'file' => array(
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
'description' => 'File name',
),
'source' => array(
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
'description' => 'Source class',
),
'title' => array(
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
'description' => 'Title',
),
'nid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => FALSE,
'description' => 'Node id of the source, if available.',
),
'fields' => array(
'type' => 'text',
'length' => 255,
'not null' => FALSE,
'description' => 'Writed fields',
),
),
'primary key' => array('id'),
'indexes' => array(
'id' => array('id'),
'created' => array('created'),
'type' => array('type'),
),
);
return $schema;
}