forked from keypic/keypic-drupal
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathkeypic.install
More file actions
63 lines (60 loc) · 1.4 KB
/
keypic.install
File metadata and controls
63 lines (60 loc) · 1.4 KB
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
<?php
/**
* @file keypic.install
*/
/**
* Implements hook_uninstall().
*/
function keypic_uninstall() {
variable_del('keypic_form_id');
variable_del('keypic_spam_point');
variable_del('keypic_widget');
drupal_uninstall_schema('keypic');
}
/**
* Implements hook_schema().
*/
function keypic_schema() {
$schema['keypic_log'] = array(
'description' => 'Table to save keypic spam point of comments.',
'fields' => array(
'entity_type' => array(
'type' => 'varchar',
'length' => 128,
'not null' => TRUE,
'default' => '',
'description' => "Entity Type",
),
'entity_id' => array(
'type' => 'int',
'not null' => TRUE,
'description' => 'Entity ID',
),
'form_id' => array(
'type' => 'varchar',
'length' => 128,
'not null' => TRUE,
'default' => '',
'description' => 'KeyPic form ID',
),
'token' => array(
'type' => 'varchar',
'length' => 128,
'not null' => TRUE,
'default' => '',
'description' => 'KeyPic token',
),
'point' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => 'Spam Point from KeyPic',
),
),
'indexes' => array(
'token' => array('token'),
),
'primary key' => array('entity_type', 'entity_id'),
);
return $schema;
}