Bug fixes

This commit is contained in:
2014-11-12 15:02:43 +11:00
parent 09291b99fc
commit eab80a1fdf
3 changed files with 160 additions and 73 deletions

View File

@@ -1,7 +1,7 @@
<?php
// $Id$
function booking_update_7100() {
$spec = array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '5', 'scale' => '2');
$spec = array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '7', 'scale' => '2');
db_add_field( 'booking_price', 'booking_late_price', $spec);
}
@@ -513,7 +513,7 @@ $result = db_insert('booking_event')
*/
function booking_uninstall() {
// Remove tables.
drupal_uninstall_schema('booking');
//drupal_uninstall_schema('booking');
}
@@ -529,6 +529,7 @@ function booking_schema() {
'booking_tempid' => array('type' => 'varchar', 'length' => '40', 'not null' => FALSE),
'booking_timestamp' => array('type' => 'int', 'not null' => TRUE, 'disp-width' => '11'),
'booking_status' => array('type' => 'int', 'length' => '11', 'default' => 0, 'not null' => FALSE),
'booking_committee_member' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE, 'default' => 'N'),
'booking_welfare_required' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE, 'default' => 'N'),
'booking_barcode' => array('type' => 'varchar', 'length' => '20', 'not null' => FALSE),
'booking_firstname' => array('type' => 'varchar', 'length' => '50', 'not null' => TRUE),
@@ -564,6 +565,18 @@ function booking_schema() {
'booking_help_readgroup_lead' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE),
'booking_help_praying' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE),
'booking_help_meditations' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE),
//other helping areas
'booking_has_mission_experience' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE),
'booking_mission_experience_details' => array('type' => 'varchar', 'length' => '500', 'not null' => FALSE),
'booking_skills_builder' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE),
'booking_skills_cooking' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE),
'booking_skills_childminding' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE),
'booking_skills_language' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE),
'booking_skills_language_details' => array('type' => 'varchar', 'length' => '500', 'not null' => FALSE),
'booking_skills_other' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE),
'booking_skills_other_details' => array('type' => 'varchar', 'length' => '500', 'not null' => FALSE),
//emergency contact info
'booking_guardian_name' => array('type' => 'varchar', 'length' => '100', 'not null' => TRUE),
'booking_guardian_type' => array('type' => 'varchar', 'length' => '100', 'not null' => TRUE),
@@ -583,7 +596,32 @@ function booking_schema() {
//'booking_payment_method' => array('type' => 'varchar', 'length' => '100', 'not null' => TRUE),
'booking_total_pay_reqd' => array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '7', 'scale' => '2'),
'booking_amount_paid' => array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '7', 'scale' => '2'),
'booking_deposit_timestamp' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'),
'booking_deposit_timestamp' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'),
'booking_refund_processed' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE, 'default' => 'N'),
'booking_refund_due' => array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '7', 'scale' => '2'),
//passport info
'booking_passport_expiry_date' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'),
'booking_passport_num' => array('type' => 'varchar', 'length' => '50', 'not null' => FALSE),
'booking_passport_issue_location' => array('type' => 'varchar', 'length' => '500', 'not null' => FALSE),
'booking_passport_issue_name' => array('type' => 'varchar', 'length' => '500', 'not null' => FALSE),
//flight info
'booking_outflight_bookingnum' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
'booking_outflight_flightnum' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
'booking_outflight_origin' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
'booking_outflight_origin' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
'booking_outflight_origin_ts' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'),
'booking_outflight_connecting_flightnum' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
'booking_outflight_destination' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
'booking_outflight_destination_ts' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
'booking_rtrnflight_bookingnum' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
'booking_rtrnflight_flightnum' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
'booking_rtrnflight_origin' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
'booking_rtrnflight_origin_ts' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
'booking_rtrnflight_connecting_flightnum' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
'booking_rtrnflight_destination' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
'booking_rtrnflight_destination_ts' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
),
'primary key' => array('nid'),
);
@@ -650,6 +688,27 @@ function booking_schema() {
'primary key' => array('vid'),
);
$schema['booking_variety_times'] = array(
'fields' => array(
'tid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
'booking_eventid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
'booking_variety_status' => array('type' => 'int', 'length' => '11', 'default' => 0, 'not null' => FALSE),
'booking_variety_time_descrip' => array('type' => 'varchar', 'length' => '500', 'not null' => TRUE),
'booking_variety_start' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'),
'booking_variety_end' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'),
),
'primary key' => array('tid'),
);
$schema['booking_variety_regn'] = array(
'fields' => array(
'rid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
'booking_variety_id' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
'booking_node_id' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
),
'primary key' => array('rid'),
);
$schema['booking_travel'] = array(
'fields' => array(
'tid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
@@ -669,6 +728,31 @@ function booking_schema() {
'primary key' => array('tid'),
);
//This lists all the study groups
$schema['booking_studygroup_list'] = array(
'fields' => array(
'sid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
'booking_eventid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
'booking_studygroup_descrip' => array('type' => 'varchar', 'length' => '500', 'not null' => FALSE),
'booking_num_group_sessions' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10', 'default' => 1),
),
'primary key' => array('sid'),
);
//this maps people to particular study groups
$schema['booking_studygroup_mapping'] = array(
'fields' => array(
'sid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
'booking_eventid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
'booking_node_id' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
'booking_studygroup_id' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
'booking_session_id' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10', default => 0),
'booking_is_leader' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE),
'booking_is_helper' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE),
),
'primary key' => array('sid'),
);
return $schema;
}