-
Notifications
You must be signed in to change notification settings - Fork 0
/
meerkat.install
68 lines (58 loc) · 1.39 KB
/
meerkat.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
<?php
// $Id$
/**
* Implementation of hook_schema().
*/
function meerkat_schema() {
$schema['meerkat'] = array(
'description' => 'Contains meerkat data',
'fields' => array(
'id' => array(
'description' => 'The primary key',
'type' => 'serial',
),
'name' => array(
'description' => 'A name to identify the settings',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
),
'data' => array(
'description' => 'The meerkat node data',
'type' => 'text',
'size' => 'big',
'not null' => TRUE,
),
),
'primary key' => array('id'),
);
return $schema;
}
/**
* Implementation of hook_install().
*/
function meerkat_install() {
drupal_install_schema('meerkat');
drupal_set_message(t('The meerkat module has been installed.'));
}
/**
* Implementation of hook_uninstall().
*/
function meerkat_uninstall() {
drupal_uninstall_schema('meerkat');
$sql = "DELETE FROM {variable} WHERE name LIKE 'meerkat_%'";
db_query($sql);
drupal_set_message(t('The meerkat module has been uninstalled.'));
}
/**
* Implementation of hook_enable().
*/
function meerkat_enable() {
drupal_set_message(t('The meerkat module has been enabled.'));
}
/**
* Implementation of hook_disable().
*/
function meerkat_disable() {
drupal_set_message(t('The meerkat module has been disabled.'));
}