-
Notifications
You must be signed in to change notification settings - Fork 0
/
batch_callback.install
93 lines (86 loc) · 2.26 KB
/
batch_callback.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
<?php
/**
* Implememts hook_install()
*/
function batch_callback_install() {
db_update('system')
->fields(array('weight' => 100))
->condition('type', 'module')
->condition('name', 'batch_callback')
->execute();
}
/**
* Implements hook_uninstall().
*/
function batch_callback_uninstall() {
}
/**
* Implements hook_enable()
*/
function batch_callback_enable() {
db_update('system')
->fields(array('weight' => 100))
->condition('type', 'module')
->condition('name', 'batch_callback')
->execute();
}
/**
* Implements hook_schema().
*/
function batch_callback_schema() {
$schema['batch_callback_log'] = array(
'description' => t('Batch Callback Log'),
'fields' => array(
'id' => array(
'description' => 'Primary identifier',
'type' => 'serial', //type = 'serial' 1st time
'unsigned' => TRUE,
'not null' => TRUE,
),
'timestamp' => array(
'description' => 'Unix timestamp for when the log entry was created.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'uid' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => t('The {user}.uid of the user which was updated.'),
),
'pid' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => t('The profile id of the user which was updated.'),
),
'contact_id' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => t('The contact id of the user which was updated.'),
),
'contact_updated' => array(
'description' => 'Contact updated flag',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'first_name' => array(
'description' => 'First name parsed from real name field.',
'type' => 'varchar',
'length' => 255,
'default' => '',
),
'last_name' => array(
'description' => 'Last name parsed from real name field.',
'type' => 'varchar',
'length' => 255,
'default' => '',
),
),
'primary key' => array('id'), //this is last element of array
);
return $schema;
}