-
Notifications
You must be signed in to change notification settings - Fork 3
/
islandora_pid_list.install
89 lines (79 loc) · 2.01 KB
/
islandora_pid_list.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
<?php
/**
* @file
* Install and uninstall functions for the islandora_pid_list module.
*/
function islandora_pid_list_schema() {
$schema['islandora_pid_list_lists'] = array(
'description' => 'Stores users and their lists',
'fields' => array(
'uid' => array(
'description' => 'The User ID.',
'type' => 'int',
'length' => 11,
'not null' => TRUE,
),
'listid' => array(
'description' => 'The ID of the list',
'type' => 'int',
'length' => 11,
'not null' => TRUE,
),
),
);
$schema['islandora_pid_list_pids'] = array(
'description' => 'Stores pids and the lists they are associated to',
'fields' => array(
'listid' => array(
'description' => 'The ID of the list',
'type' => 'int',
'length' => 11,
'not null' => TRUE,
),
'pidid' => array(
'description' => 'The PID of the Fedora Object.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
),
),
);
$schema['islandora_pid_list_names'] = array(
'description' => 'Stores lists and their associated names',
'fields' => array(
'listid' => array(
'description' => 'The ID of the list',
'type' => 'serial',
'length' => 11,
'not null' => TRUE,
),
'listname' => array(
'description' => 'The name of the list.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
),
'listowner' => array(
'description' => 'The user ID of who owns the list.',
'type' => 'int',
'length' => 11,
),
),
'primary key' => array('listid'),
);
return $schema;
}
/**
* Implementation of hook_install().
*/
function islandora_pid_list_install() {
// Create table
drupal_install_schema('islandora_pid_list');
}
/**
* Implementation of hook_uninstall().
*/
function islandora_pid_list_uninstall() {
//Drop Tables
drupal_uninstall_schema('islandora_pid_list');
}