This repository has been archived by the owner on Jan 17, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
application.install
280 lines (247 loc) · 22.1 KB
/
application.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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
<?php
// $Id$
/**
* @file
* FHCHS General College Application
*
* Install file.
*
*/
function application_schema() {
$schema['application_Programs'] = array(
'description' => t('The programs a student applies for.'),
'fields' => array(
'Program_Applicaiton_ID' => array('description' => t('Program_Applicaiton_ID'), 'type' => 'serial'),
'Student_StudentID' => array('description' => t('Student_StudentID'), 'type' => 'varchar', 'length' => 9, 'not null' => TRUE, 'default' => ''),
'Year' => array('description' => t('Year'), 'type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
'Term' => array('description' => t('Term'), 'type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
'Campus' => array('description' => t('Campus'), 'type' => 'varchar', 'length' => 2, 'not null' => TRUE, 'default' => ''),
'Department' => array('description' => t('Department'), 'type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
'Program' => array('description' => t('Program'), 'type' => 'varchar', 'length' => 10, 'not null' => FALSE, 'default' => ''),
),
'unique keys' => array(
'Program_Applicaiton_ID' => array('Program_Applicaiton_ID')
),
'primary key' => array('Program_Applicaiton_ID'),
);
$schema['application_Address'] = array(
'description' => t('Applicant address'),
'fields' => array(
'Address_ID' => array('description' => t('Address_ID'), 'type' => 'serial'),
'Student_StudentID' => array('description' => t('Student_StudentID'), 'type' => 'varchar', 'length' => 9 , 'not null' => TRUE , 'default' => ''),
'Country' => array('description' => t('Country'), 'type' => 'varchar', 'length' => 25 , 'not null' => TRUE , 'default' => ''),
'State' => array('description' => t('State'), 'type' => 'varchar', 'length' => 2 , 'not null' => FALSE, 'default' => ''),
'City' => array('description' => t('City'), 'type' => 'varchar', 'length' => 35 , 'not null' => TRUE , 'default' => ''),
'Postal' => array('description' => t('Postal'), 'type' => 'varchar', 'length' => 10 , 'not null' => TRUE , 'default' => ''),
'Street' => array('description' => t('Street'), 'type' => 'varchar', 'length' => 35 , 'not null' => TRUE , 'default' => ''),
'Primary_phone' => array('description' => t('Primary_phone'), 'type' => 'varchar', 'length' => 15 , 'not null' => TRUE , 'default' => ''),
'Mobile_phone' => array('description' => t('Mobile_phone'), 'type' => 'varchar', 'length' => 15 , 'not null' => FALSE , 'default' => ''),
'Alternate_phone' => array('description' => t('Alternate_phone'), 'type' => 'varchar', 'length' => 15 , 'not null' => FALSE, 'default' => ''),
'Email' => array('description' => t('Email'), 'type' => 'varchar', 'length' => 100, 'not null' => TRUE , 'default' => ''),
'Type' => array('description' => t('Type'), 'type' => 'varchar', 'length' => 10 , 'not null' => FALSE, 'default' => ''),
'Contact_Name' => array('description' => t('Contact_Name'), 'type' => 'varchar', 'length' => 32 , 'not null' => FALSE, 'default' => ''),
),
'unique keys' => array(
'Address_ID' => array('Address_ID')
),
'primary key' => array('Address_ID'),
);
$schema['application_Certs'] = array(
'description' => t('The cert license award information table.'),
'fields' => array(
'Cert_ID' => array('description' => t('Cert_ID'), 'type' => 'serial'),
'Student_StudentID' => array('description' => t('Student_StudentID'), 'type' => 'varchar', 'length' => 9, 'not null' => TRUE, 'default' => ''),
'Cert' => array('description' => t('Cert'), 'type' => 'varchar', 'length' => 50, 'not null' => TRUE, 'default' => ''),
'Cert_Country' => array('description' => t('Cert_Country'), 'type' => 'varchar', 'length' => 25, 'not null' => TRUE, 'default' => ''),
'Cert_State' => array('description' => t('Cert_State'), 'type' => 'varchar', 'length' => 2, 'not null' => FALSE, 'default' => ''),
'Effective_date' => array('description' => t('Effective_date'), 'type' => 'datetime', 'not null' => TRUE),
'Expiration_date' => array('description' => t('Expiration_date'), 'type' => 'datetime', 'not null' => FALSE),
'Memo' => array('description' => t('Memo'), 'type' => 'varchar', 'length' => 150, 'not null' => FALSE, 'default' => ''),
),
'unique keys' => array(
'Cert_ID' => array('Cert_ID')
),
'primary key' => array('Cert_ID'),
);
$schema['application_Institutions'] = array(
'description' => t('The institution information table.'),
'fields' => array(
'Institution_ID' => array('description' => t('Institution_ID'), 'type' => 'serial'),
'Student_StudentID' => array('description' => t('Student_StudentID'), 'type' => 'varchar', 'length' => 9, 'not null' => TRUE, 'default' => ''),
'Institution_Name' => array('description' => t('Institution_Name'), 'type' => 'varchar', 'length' => 50, 'not null' => TRUE, 'default' => ''),
'Institution_Country' => array('description' => t('Institution_Country'), 'type' => 'varchar', 'length' => 25, 'not null' => TRUE, 'default' => ''),
'Institution_City' => array('description' => t('Institution_City'), 'type' => 'varchar', 'length' => 50, 'not null' => TRUE, 'default' => ''),
'Institution_State' => array('description' => t('Institution_State'), 'type' => 'varchar', 'length' => 2, 'not null' => FALSE, 'default' => ''),
'First_Year_Attended' => array('description' => t('First_Year_Attended'), 'type' => 'int', 'not null' => TRUE, 'default' => 0),
'Last_Year_Attended' => array('description' => t('Last_Year_Attended'), 'type' => 'int', 'not null' => TRUE, 'default' => 0),
'Degree' => array('description' => t('Degree'), 'type' => 'varchar', 'length' => 35, 'not null' => TRUE, 'default' => ''),
'Degree_Certificate_Complete' => array('description' => t('Degree_Certificate_Complete'), 'type' => 'int', 'size' => 'tiny','not null' => TRUE, 'default' => 0),
'Year_Degree_Completed' => array('description' => t('Year_Degree_Completed'), 'type' => 'int', 'not null' => FALSE, 'default' => 0),
'Major' => array('description' => t('Major'), 'type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
'Sonis_Institution_ID' => array('description' => t('Sonis_Institurion_ID'), 'type' => 'varchar', 'length' => 16, 'not null' => FALSE, 'default' => ''),
),
'unique keys' => array(
'Institution_ID' => array('Institution_ID')
),
'primary key' => array('Institution_ID'),
);
$schema['application_Biographic'] = array(
'description' => t('The student information table.'),
'fields' => array(
'Student_StudentID' => array('description' => t('Student_StudentID'), 'type' => 'varchar', 'length' => 9 , 'not null' => TRUE, 'default' => ''),
'Application_Started' => array('description' => t('Application_Started'), 'type' => 'datetime' , 'not null' => FALSE),
'Student_Nickname' => array('description' => t('Student_Nickname'), 'type' => 'varchar', 'length' => 20, 'not null' => TRUE, 'default' => ''),
'Student_Fname' => array('description' => t('Student_Fname'), 'type' => 'varchar', 'length' => 30, 'not null' => TRUE, 'default' => ''),
'Student_Lname' => array('description' => t('Student_Lname'), 'type' => 'varchar', 'length' => 30, 'not null' => TRUE, 'default' => ''),
'Student_Mname' => array('description' => t('Student_Mname'), 'type' => 'varchar', 'length' => 15, 'not null' => FALSE, 'default' => ''),
'Student_FormerLname' => array('description' => t('Student_FormerLname'), 'type' => 'varchar', 'length' => 22, 'not null' => FALSE, 'default' => ''),
'Student_DOB' => array('description' => t('Student_DOB'), 'type' => 'datetime' , 'not null' => TRUE),
'Student_SSN' => array('description' => t('Student_SSN'), 'type' => 'varchar', 'length' => 9 , 'not null' => TRUE, 'default' => ''),
'Birth_Country' => array('description' => t('Birth_Country'), 'type' => 'varchar', 'length' => 25, 'not null' => TRUE, 'default' => ''),
'Birth_City' => array('description' => t('Birth_City'), 'type' => 'varchar', 'length' => 35, 'not null' => TRUE, 'default' => ''),
'Birth_State' => array('description' => t('Birth_State'), 'type' => 'varchar', 'length' => 2 , 'not null' => FALSE, 'default' => ''),
'Felony' => array('description' => t('Felony'), 'type' => 'int', 'size' => 'tiny' , 'not null' => FALSE, 'default' => 0),
'Citizenship_Country' => array('description' => t('Citizenship_Country'), 'type' => 'varchar', 'length' => 25, 'not null' => TRUE, 'default' => ''),
'Citizenship_ID_Number' => array('description' => t('Citizenship_ID_Number'), 'type' => 'varchar', 'length' => 50, 'not null' => TRUE, 'default' => ''),
'Citizenship_ID_Type' => array('description' => t('Citizenship_ID_Type'), 'type' => 'varchar', 'length' => 50, 'not null' => TRUE, 'default' => ''),
'Citizenship_Visa_Status' => array('description' => t('Citizenship_Visa_Status'), 'type' => 'varchar', 'length' => 50, 'not null' => TRUE, 'default' => ''),
'HighSchool_Name' => array('description' => t('HighSchool_Name'), 'type' => 'varchar', 'length' => 50, 'not null' => TRUE, 'default' => ''),
'HighSchool_Country' => array('description' => t('HighSchool_Country'), 'type' => 'varchar', 'length' => 25, 'not null' => TRUE, 'default' => ''),
'HighSchool_State' => array('description' => t('HighSchool_State'), 'type' => 'varchar', 'length' => 2 , 'not null' => FALSE, 'default' => ''),
'HighSchool_City' => array('description' => t('HighSchool_City'), 'type' => 'varchar', 'length' => 20, 'not null' => TRUE, 'default' => ''),
'HighSchool_Attendance' => array('description' => t('HighSchool_Attendance'), 'type' => 'int', 'size' => 'tiny' , 'not null' => TRUE, 'default' => 1),
'HighSchool_Grad_Year' => array('description' => t('HighSchool_Grad_Year'), 'type' => 'varchar', 'length' => 4 , 'not null' => FALSE, 'default' => ''),
'HighSchool_Sonis_ID' => array('description' => t('HighSchool_Soinis_ID'), 'type' => 'varchar', 'length' => 16, 'not null' => FALSE, 'default' => ''),
'OtherSchooling_CLEP' => array('description' => t('OtherSchooling_CLEP'), 'type' => 'int', 'size' => 'tiny' , 'not null' => FALSE, 'default' => 0),
'OtherSchooling_AP' => array('description' => t('OtherSchooling_AP'), 'type' => 'int', 'size' => 'tiny' , 'not null' => FALSE, 'default' => 0),
'OtherSchooling_IB' => array('description' => t('OtherSchooling_IB'), 'type' => 'int', 'size' => 'tiny' , 'not null' => FALSE, 'default' => 0),
'HighSchool_Equivalent_Type' => array('description' => t('HighSchool_Equivalent_Type'), 'type' => 'varchar', 'length' => 50, 'not null' => FALSE, 'default' => ''),
'GED_Testing_Site' => array('description' => t('GED_Testing_Site'), 'type' => 'varchar', 'length' => 50, 'not null' => FALSE, 'default' => ''),
'GED_Date_Of_Issue' => array('description' => t('GED_Date_Of_Issue'), 'type' => 'datetime' , 'not null' => FALSE),
'Statistics_Gender' => array('description' => t('Statistics_Gender'), 'type' => 'varchar', 'length' => 1 , 'not null' => TRUE, 'default' => ''),
'Statistics_First_Generation' => array('description' => t('Statistics_First_Generation'), 'type' => 'varchar', 'length' => 1 , 'not null' => TRUE, 'default' => ''),
'Statistics_US_Military_Veteran' => array('description' => t('Statistics_US_Military_Veteran'), 'type' => 'int', 'size' => 'tiny' , 'not null' => FALSE),
'Statistics_Receiving_Veteran_Benefits', array('description' => t('Statistics_Receiving_Veteran_Benefits'), 'type' => 'int', 'size' => 'tiny', 'not null' => FALSE),
'Statistics_Hispanic' => array('description' => t('Statistics_Hispanic'), 'type' => 'varchar', 'length' => 2 , 'not null' => TRUE, 'default' => ''),
'Statistics_Ethnic_Origin' => array('description' => t('Statistics_Ethnic_Origin'), 'type' => 'varchar', 'length' => 2 , 'not null' => TRUE, 'default' => ''),
'Statistics_Native_English' => array('description' => t('Statistics_Native_English'), 'type' => 'varchar', 'length' => 2 , 'not null' => TRUE, 'default' => ''),
'Statistics_Native_Language' => array('description' => t('Statistics_Native_Language'), 'type' => 'varchar', 'length' => 20, 'not null' => TRUE, 'default' => ''),
'Statistics_Marital_Status' => array('description' => t('Statistics_Marital_Status'), 'type' => 'varchar', 'length' => 2 , 'not null' => TRUE, 'default' => ''),
'Statistics_Religious_Affiliation' => array('description' => t('Statistics_Religious_Affiliation'), 'type' => 'varchar', 'length' => 2 , 'not null' => TRUE, 'default' => ''),
'Statistics_Home_Church' => array('description' => t('Statistics_Home_Church'), 'type' => 'varchar', 'length' => 50, 'not null' => FALSE, 'default' => ''),
'Statistics_Home_Church_City' => array('description' => t('Statistics_Home_Church_City'), 'type' => 'varchar', 'length' => 50, 'not null' => FALSE, 'default' => ''),
'Statistics_Home_Church_State' => array('description' => t('Statistics_Home_Church_State'), 'type' => 'varchar', 'length' => 2 , 'not null' => FALSE, 'default' => ''),
'Personal_Statement_Agreement' => array('description' => t('Personal_Statement_Agreement.'), 'type' => 'int', 'size' => 'tiny' , 'not null' => TRUE, 'default' => 0),
'Application_Finished' => array('description' => t('Application_Finished'), 'type' => 'datetime' , 'not null' => FALSE),
'referby' => array('description' => t('Refer_by'), 'type' => 'varchar', 'length' => 100, 'not null' => TRUE, 'default' => ''),
),
'unique keys' => array(
'Student_StudentID' => array('Student_StudentID')
),
'primary key' => array('Student_StudentID'),
);
$schema['application_fhchs_attendance'] = array(
'description' => t('The previous experience this student has had with FHCHS'),
'fields' => array(
'sid' => array('description' => t('Student_StudentID'), 'type' => 'serial'),
'attendance_type' => array('description' => t('Attendance_Type'), 'type' => 'varchar', 'length' => 32, 'not null' => FALSE,'default' => ''),
'attendance_date' => array('description' => t('Attendance_Date'), 'type' => 'varchar', 'length' => 32, 'not null' => FALSE, 'default' => ''),
),
'unique keys' => array(
'sid' => array('sid')
),
'primary key' => array('sid'),
);
$schema['application_authorize_person'] = array(
'description' => t('Table that stores people authorized to view student profile during enroment process.'),
'fields' => array(
'person_id' => array('description' => t('Person_Id'), 'type' => 'serial'),
'Student_StudentID' => array('description' => t('Student_StudentID'), 'type' => 'varchar', 'length' => 9, 'not null' => TRUE, 'default' => ''),
'first_name' => array('description' => t('First_Name'), 'type' => 'varchar', 'length' => 30, 'not null' => TRUE, 'default' => ''),
'last_name' => array('description' => t('Last_Name'), 'type' => 'varchar', 'length' => 30, 'not null' => TRUE, 'default' => ''),
'relationship' => array('description' => t('Relationship'), 'type' => 'varchar', 'length' => 50, 'not null' => TRUE, 'default' => ''),
),
'unique keys' => array(
'person_id' => array('person_id')
),
'primary key' => array('person_id'),
);
return $schema;
}
function application_install() {
// Create my tables.
drupal_install_schema('application');
}
function application_uninstall() {
// Drop my tables.
drupal_uninstall_schema('application');
// Remove variables.
variable_del('application_sonis_api_url');
}
function application_update_1() {
$ret = array();
db_add_field($ret, 'application_Biographic', 'HighSchool_Grad_Year', array('description' => t('HighSchool_Grad_Year'), 'type' => 'varchar', 'length' => 4, 'not null' => FALSE, 'default' => ''));
db_add_field($ret, 'application_Biographic', 'Felony', array('description' => t('Felony'), 'type' => 'int', 'size' => 'tiny', 'not null' => FALSE, 'default' => 0));
db_add_field($ret, 'application_Biographic', 'Application_Started', array('description' => t('Application_Started'), 'type' => 'datetime', 'not null' => FALSE));
db_add_field($ret, 'application_Biographic', 'Application_Finished', array('description' => t('Application_Finished'), 'type' => 'datetime', 'not null' => FALSE));
return $ret;
}
function application_update_2() {
variable_del('application_sonis_api_url');
}
function application_update_3() {
$ret = array();
db_field_set_default($ret, 'application_Biographic', 'HighSchool_Attendance', 1);
db_add_field($ret, 'application_Biographic', 'Statistics_US_Military_Veteran', array('description' => t('Statistics_US_Military_Veteran'), 'type' => 'int', 'size' => 'tiny', 'not null' => FALSE));
db_add_field($ret, 'application_Biographic', 'Statistics_Receiving_Veteran_Benefits', array('description' => t('Statistics_Receiving_Veteran_Benefits'), 'type' => 'int', 'size' => 'tiny', 'not null' => FALSE));
db_add_field($ret, 'application_Institutions', 'Degree', array('description' => t('Degree'), 'type' => 'varchar', 'length' => 35, 'not null' => TRUE, 'default' => ''));
db_add_field($ret, 'application_Programs', 'Campus', array('description' => t('Campus'), 'type' => 'varchar', 'length' => 2, 'not null' => TRUE, 'default' => ''));
return $ret;
}
function application_update_4() {
$ret = array();
db_add_field($ret, 'application_Biographic', 'HighSchool_Equivalent_Type', array('description' => t('HighSchool_Equivalent_Type'), 'type' => 'varchar', 'length' => 50, 'not null' => FALSE, 'default' => ''));
return $ret;
}
function application_update_5() {
$table = array(
'description' => t('The previous experience this student has had with FHCHS'),
'fields' => array(
'sid' => array('description' => t('Student_StudentID'), 'type' => 'serial'),
'attendance_type' => array('description' => t('Attendance_Type'), 'type' => 'varchar', 'length' => 32, 'not null' => FALSE,'default' => ''),
'attendance_date' => array('description' => t('Attendance_Date'), 'type' => 'varchar', 'length' => 32, 'not null' => FALSE, 'default' => ''),
),
'unique keys' => array(
'sid' => array('sid')
),
'primary key' => array('sid'),
);
$ret = array();
db_create_table($ret, 'application_fhchs_attendance', $table);
return $ret;
}
function application_update_6() {
// Create new table
$table = array(
'description' => t('Table that stores people authorized to view student profile during enroment process.'),
'fields' => array(
'person_id' => array('description' => t('Person_Id'), 'type' => 'serial'),
'Student_StudentID' => array('description' => t('Student_StudentID'), 'type' => 'varchar', 'length' => 9, 'not null' => TRUE, 'default' => ''),
'first_name' => array('description' => t('First_Name'), 'type' => 'varchar', 'length' => 30, 'not null' => TRUE, 'default' => ''),
'last_name' => array('description' => t('Last_Name'), 'type' => 'varchar', 'length' => 30, 'not null' => TRUE, 'default' => ''),
'relationship' => array('description' => t('Relationship'), 'type' => 'varchar', 'length' => 50, 'not null' => TRUE, 'default' => ''),
),
'unique keys' => array(
'person_id' => array('person_id')
),
'primary key' => array('person_id'),
);
$ret = array();
db_create_table($ret, 'application_authorize_person', $table);
return $ret;
}
function application_update_7() {
$ret = array();
db_add_field($ret, 'application_Biographic', 'referby', array('description' => t('Refer_by'), 'type' => 'varchar', 'length' => 100, 'not null' => TRUE, 'default' => ''));
return $ret;
}