-
Notifications
You must be signed in to change notification settings - Fork 0
/
campaignion_logcrm.install
72 lines (67 loc) · 1.67 KB
/
campaignion_logcrm.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
<?php
/**
* @file
* Define the schema, install and update hooks.
*/
/**
* Implements hook_schema().
*/
function campaignion_logcrm_schema() {
$tables['campaignion_logcrm_queue'] = [
'description' => 'Send queue for logcrm events.',
'fields' => [
'type' => [
'description' => 'Type of data to be sent (ie, webform_submission, payment).',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
],
'id' => array(
'description' => 'The ID for the data item.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'created' => array(
'description' => 'The Unix timestamp when the queue item was created.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'locked' => array(
'description' => 'This queue item is locked until this time.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'event' => array(
'description' => 'Serialized LogCRM event.',
'type' => 'blob',
'size' => 'big',
),
],
'primary key' => array('type', 'id'),
];
return $tables;
}
/**
* Helper function to set the module weight.
*/
function _campaignion_logcrm_set_weight($module, $weight) {
db_update('system')
->fields(array('weight' => $weight))
->condition('name', $module)
->execute();
}
/**
* Implements hook_install().
*/
function campaignion_logcrm_install() {
_campaignion_logcrm_set_weight('campaignion_logcrm', 100);
}
/**
* Set the module weight.
*/
function campaignion_logcrm_7101() {
_campaignion_logcrm_set_weight('campaignion_logcrm', 100);
}