-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrsvplist.install
59 lines (58 loc) · 1.49 KB
/
rsvplist.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
<?php
function rsvplist_schema() {
$schema['rsvplist'] = [
'description' => 'Stores email, timestamp, nid and uid for an rsvp',
'fields' => [
'id' => [
'description' => 'The primary identifer for the record.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
],
'uid' => [
'description' => 'The {users}.uid that added this rsvp.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
],
'nid' => [
'description' => 'The {node}.nid for this rsvp.',
'type' => 'varchar',
'length' => 64,
'not null' => FALSE,
'default' => 0,
],
'mail' => [
'description' => 'User\'s email address.',
'type' => 'varchar',
'length' => 64,
'not null' => FALSE,
'default' => '',
],
'created' => [
'description' => 'Timestamp for when rsvp was created.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
],
],
'primary key' => ['id'],
'indexes' => [
'node' => ['nid'],
'node_user' => ['nid', 'uid'],
],
];
$schema['rsvplist_enabled'] = [
'description' => 'Tracks wheter rsvplist is enabled for a node.',
'fields' => [
'nid' => [
'description' => 'The {node}.id that has rsvplist enabled.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
],
],
'primary key' => ['nid'],
];
return $schema;
}