-
Notifications
You must be signed in to change notification settings - Fork 3
/
ding_custom_reservation.install
77 lines (73 loc) · 2.09 KB
/
ding_custom_reservation.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
<?php
/**
* @file
* Handles installation/un-installation of ding custom reserveration module.
*/
/**
* Implements hook_schema().
*/
function ding_custom_reservation_schema() {
$schema['ding_custom_reservation_statistics'] = array(
'fields' => array(
'id' => array(
'description' => 'Primary key',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'reservationtype' => array(
'description' => 'The type off reservation',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'interestperiod' => array(
'description' => 'The interest period',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'materialtype' => array(
'description' => 'The type off the material',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'classification' => array(
'description' => 'The classification off the material',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'day' => array(
'description' => 'Day query was performed.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'id',
),
);
return $schema;
}
/**
* Implements hook_uninstall().
*/
function ding_custom_reservation_uninstall() {
// Unset variables.
variable_del('ding_custom_reservations_interest_period');
variable_del('ding_custom_reservation_secondary_reservation_button');
variable_del('ding_custom_reservation_secondary_reservation_button_interest_period');
variable_del('ding_custom_reservation_secondary_reservation_button_text');
variable_del('ding_custom_reservation_interest_periods');
variable_del('ding_custom_reservation_title_text');
variable_del('ding_custom_reservation_title_description');
variable_del('ding_custom_reservation_keep_statistics_days');
}