This repository has been archived by the owner on Feb 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
memappl.install
151 lines (147 loc) · 4.25 KB
/
memappl.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<?php
/**
* Implements hook_schema().
*/
function memappl_schema() {
$schema['memappl'] = array(
'description' => 'table for module memappl to store membership applications',
'fields' => array(
'id' => array(
'description' => 'primary id key',
'type' => 'serial',
'not null' => TRUE,
),
'first_submit' => array(
'description' => 'unix timestamp when form submited',
'type' => 'int',
'not null' => TRUE,
),
'reminder_send' => array(
'description' => 'unix timestamp when reminder e-mail was send',
'type' => 'int',
'not null' => FALSE,
),
'confirmed' => array(
'description' => 'unix timestamp when e-mail address was confirmed by link',
'type' => 'int',
'not null' => FALSE,
),
'confirmcode' => array(
'description' => 'code (sha1) to use for e-mail address confirmation',
'type' => 'varchar',
'length' => '40',
'not null' => TRUE,
),
'canceled' => array(
'description' => 'bool: true if application was canceled',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'firstname' => array(
'description' => 'the firstname of person',
'type' => 'varchar',
'length' => '50',
'not null' => TRUE,
),
'lastname' => array(
'description' => 'the lastname of person',
'type' => 'varchar',
'length' => '50',
'not null' => TRUE,
),
'birthday' => array(
'description' => 'the birthday in YYYY-mm-dd format',
'type' => 'varchar',
'length' => '10',
'not null' => TRUE,
),
'nationality' => array(
'description' => 'the nationality of person',
'type' => 'varchar',
'length' => '50',
'not null' => TRUE,
),
'street' => array(
'description' => 'the street (with number) where person live',
'type' => 'varchar',
'length' => '50',
'not null' => TRUE,
),
'postcode' => array(
'description' => 'the postcode of city where person live',
'type' => 'varchar',
'length' => '10',
'not null' => TRUE,
),
'city' => array(
'description' => 'city where person live',
'type' => 'varchar',
'length' => '50',
'not null' => TRUE,
),
'state' => array(
'description' => 'state where person live',
'type' => 'varchar',
'length' => '50',
'not null' => TRUE,
),
'federal_state' => array(
'description' => 'federal city where person live',
'type' => 'varchar',
'length' => '50',
'not null' => TRUE,
),
'administrative_district' => array(
'description' => 'administrative district where person live',
'type' => 'varchar',
'length' => '50',
'not null' => TRUE,
),
'email_address' => array(
'description' => 'e-mail address of person (would be tested)',
'type' => 'varchar',
'length' => '50',
'not null' => TRUE,
),
'phone_number' => array(
'description' => 'the phone number of person (optional)',
'type' => 'varchar',
'length' => '50',
'not null' => FALSE,
),
'remarks' => array(
'description' => 'person may enter remarks for the office',
'type' => 'text',
'not null' => FALSE,
),
'refused_in_the_past' => array(
'description' => 'bool: true if membership application was refused in the past.',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array('id'),
'indexes' => array(
'confirmcode' => array('confirmcode'),
),
);
return $schema;
}
/**
* adding support for the checkbox "My membership application was refused in the past."
*/
function memappl_update_7000() {
$spec = array(
'description' => 'bool: true if membership application was refused in the past.',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
);
db_add_field('memappl', 'refused_in_the_past', $spec);
}
?>