-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbaker.install
61 lines (55 loc) · 1.24 KB
/
baker.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
<?php
// $Id: baker.install,v 0.9 2009/11/29 20:17:36 fran Exp $
/**
* Implementation of hook_install().
*/
function baker_install() {
// Create tables.
drupal_install_schema('baker');
}
/**
* Implementation of hook_uninstall().
*/
function baker_uninstall() {
// Remove tables.
drupal_uninstall_schema('baker');
}
/**
* Implementation of hook_schema().
*/
function baker_schema() {
$schema['baker'] = array(
'description' => 'baker pk',
'fields' => array(
'bid' => array(
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => 'Primary Key',
),
'url' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => 'The url',
),
'title' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => 'Custom title for the url',
),
'redirect' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => 'Custom redirect',
),
),
'primary key' => array('bid')
);
return $schema;
}