612 lines
30 KiB
Plaintext
612 lines
30 KiB
Plaintext
<?php
|
|
// $Id$
|
|
function booking_update_7100() {
|
|
$spec = array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '5', 'scale' => '2');
|
|
db_add_field( 'booking_price', 'booking_late_price', $spec);
|
|
}
|
|
|
|
function booking_update_7101() {
|
|
$spec = array('type' => 'varchar', 'length' => '50', 'not null' => FALSE);
|
|
db_add_field( 'booking_price', 'booking_late_buttonid', $spec);
|
|
}
|
|
|
|
function booking_update_7102() {
|
|
$spec = array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11');
|
|
db_add_field( 'booking_person', 'booking_deposit_timestamp', $spec);
|
|
}
|
|
|
|
function booking_update_7103() {
|
|
$spec = array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11');
|
|
db_add_field( 'booking_event', 'booking_event_start', $spec);
|
|
$spec = array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11');
|
|
db_add_field( 'booking_event', 'booking_event_end', $spec);
|
|
}
|
|
|
|
function booking_update_7104() {
|
|
$spec = array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11');
|
|
db_change_field('booking_person', 'booking_deposit_timestamp', 'booking_deposit_timestamp', $spec);
|
|
}
|
|
|
|
function booking_update_7105() {
|
|
//remove no longer used earlybird rate flag, replaced by regular and late prices
|
|
db_drop_field('booking_price', 'booking_earlybird_rate');
|
|
}
|
|
|
|
function booking_update_7106() {
|
|
//add passport details
|
|
$spec = array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11');
|
|
db_add_field( 'booking_person', 'booking_passport_issue_date', $spec);
|
|
db_add_field( 'booking_person', 'booking_passport_expiry_date', $spec);
|
|
$spec = array('type' => 'varchar', 'length' => '50', 'not null' => FALSE);
|
|
db_add_field( 'booking_person', 'booking_passport_num', $spec);
|
|
//add mission area experience details
|
|
$spec = array('type' => 'varchar', 'length' => '1', 'not null' => FALSE);
|
|
db_add_field( 'booking_person', 'booking_has_mission_experience', $spec);
|
|
$spec = array('type' => 'varchar', 'length' => '200', 'not null' => FALSE);
|
|
db_add_field( 'booking_person', 'booking_mission_experience_details', $spec);
|
|
}
|
|
|
|
function booking_update_7107() {
|
|
$spec = array('type' => 'varchar', 'length' => '500', 'not null' => FALSE);
|
|
db_change_field('booking_person', 'booking_mission_experience_details', 'booking_mission_experience_details', $spec);
|
|
}
|
|
|
|
/**
|
|
* Add special skills section, update passport info
|
|
*/
|
|
function booking_update_7108() {
|
|
//passport updates
|
|
$spec = array('type' => 'varchar', 'length' => '200', 'not null' => FALSE);
|
|
db_add_field( 'booking_person', 'booking_passport_issue_location', $spec);
|
|
db_add_field( 'booking_person', 'booking_passport_issue_name', $spec);
|
|
db_drop_field('booking_price', 'booking_passport_issue_date');
|
|
//skills type flags
|
|
$spec_flag = array('type' => 'varchar', 'length' => '1', 'not null' => FALSE);
|
|
db_add_field( 'booking_person', 'booking_skills_builder', $spec_flag);
|
|
db_add_field( 'booking_person', 'booking_skills_cooking', $spec_flag);
|
|
db_add_field( 'booking_person', 'booking_skills_childminding', $spec_flag);
|
|
db_add_field( 'booking_person', 'booking_skills_language', $spec_flag);
|
|
db_add_field( 'booking_person', 'booking_skills_language_details', $spec);
|
|
db_add_field( 'booking_person', 'booking_skills_other', $spec_flag);
|
|
db_add_field( 'booking_person', 'booking_skills_other_details', $spec);
|
|
|
|
}
|
|
/**
|
|
* Make varchar fields bigger
|
|
*/
|
|
function booking_update_7109() {
|
|
$spec = array('type' => 'varchar', 'length' => '500', 'not null' => FALSE);
|
|
db_change_field('booking_person', 'booking_passport_issue_location', 'booking_passport_issue_location', $spec);
|
|
db_change_field('booking_person', 'booking_skills_language_details', 'booking_skills_language_details', $spec);
|
|
db_change_field('booking_person', 'booking_skills_other_details', 'booking_skills_other_details', $spec);
|
|
}
|
|
|
|
/**
|
|
* Add event ID field to the payments table
|
|
*/
|
|
function booking_update_7201() {
|
|
//$spec = array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10');
|
|
//db_add_field( 'booking_payment', 'booking_eventid', $spec);
|
|
}
|
|
|
|
/**
|
|
* Add table for variety sessions
|
|
*/
|
|
function booking_update_7202() {
|
|
$booking_variety_options = array(
|
|
'fields' => array(
|
|
'vid' => 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_timeslot_id' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
|
'booking_variety_descrip' => array('type' => 'varchar', 'length' => '500', 'not null' => TRUE),
|
|
'booking_variety_maxsize' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
|
'booking_variety_regncount' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
|
),
|
|
'primary key' => array('vid'),
|
|
);
|
|
$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'),
|
|
);
|
|
|
|
$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'),
|
|
);
|
|
|
|
|
|
db_create_table('booking_variety_options', $booking_variety_options);
|
|
db_create_table('booking_variety_times', $booking_variety_times);
|
|
db_create_table('booking_variety_regn', $booking_variety_regn);
|
|
|
|
//TODO: create tables for variety session timeslots and variety session registrations (map user to variety session id)
|
|
//admin forms to create timeslots, then add variety sessions to each timeslot
|
|
//user form to register for a given variety session
|
|
}
|
|
|
|
/**
|
|
* Add tables for study group calculations
|
|
*/
|
|
function booking_update_7203() {
|
|
//This lists all the study groups
|
|
$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
|
|
$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'),
|
|
'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'),
|
|
);
|
|
|
|
|
|
db_create_table('booking_studygroup_list', $booking_studygroup_list);
|
|
db_create_table('booking_studygroup_mapping', $booking_studygroup_mapping);
|
|
//db_create_table('booking_leadhelp_list', $booking_leadhelp_list);
|
|
}
|
|
|
|
/**
|
|
* Pre-populate the study group sessions table
|
|
*/
|
|
function booking_update_7204() {
|
|
|
|
$result = db_insert('booking_studygroup_list')
|
|
->fields(array(
|
|
'booking_eventid' => 2,
|
|
'booking_studygroup_descrip' => 'Monday',
|
|
'booking_num_group_sessions' => 16,
|
|
))
|
|
->execute();
|
|
$result = db_insert('booking_studygroup_list')
|
|
->fields(array(
|
|
'booking_eventid' => 2,
|
|
'booking_studygroup_descrip' => 'Tuesday',
|
|
'booking_num_group_sessions' => 16,
|
|
))
|
|
->execute();
|
|
$result = db_insert('booking_studygroup_list')
|
|
->fields(array(
|
|
'booking_eventid' => 2,
|
|
'booking_studygroup_descrip' => 'Wednesday',
|
|
'booking_num_group_sessions' => 16,
|
|
))
|
|
->execute();
|
|
$result = db_insert('booking_studygroup_list')
|
|
->fields(array(
|
|
'booking_eventid' => 2,
|
|
'booking_studygroup_descrip' => 'Thursday',
|
|
'booking_num_group_sessions' => 16,
|
|
))
|
|
->execute();
|
|
$result = db_insert('booking_studygroup_list')
|
|
->fields(array(
|
|
'booking_eventid' => 2,
|
|
'booking_studygroup_descrip' => 'Friday',
|
|
'booking_num_group_sessions' => 16,
|
|
))
|
|
->execute();
|
|
$result = db_insert('booking_studygroup_list')
|
|
->fields(array(
|
|
'booking_eventid' => 2,
|
|
'booking_studygroup_descrip' => 'Saturday',
|
|
'booking_num_group_sessions' => 16,
|
|
))
|
|
->execute();
|
|
}
|
|
|
|
/**
|
|
* Add extra field to the study group sessions table
|
|
*/
|
|
function booking_update_7205() {
|
|
|
|
}
|
|
|
|
/**
|
|
* Add another field to the booking_studygroup_mapping table
|
|
*/
|
|
function booking_update_7206() {
|
|
$spec = array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10', 'default' => 0);
|
|
db_add_field( 'booking_studygroup_mapping', 'booking_session_id', $spec);
|
|
}
|
|
|
|
/**
|
|
* Add field to support welfare required flag
|
|
*/
|
|
function booking_update_7207() {
|
|
$spec = array('type' => 'int', 'length' => '11', 'default' => 0, 'not null' => FALSE);
|
|
db_add_field( 'booking_person', 'booking_welfare_required', $spec);
|
|
}
|
|
|
|
|
|
/**
|
|
* Update definition for welfare required flag
|
|
*/
|
|
function booking_update_7208() {
|
|
$spec = array('type' => 'varchar', 'length' => '1', 'not null' => FALSE, 'default' => 'N');
|
|
db_change_field('booking_person', 'booking_welfare_required', 'booking_welfare_required', $spec);
|
|
}
|
|
|
|
/**
|
|
* Add field for reserve leader
|
|
*/
|
|
function booking_update_7209() {
|
|
$spec = array('type' => 'varchar', 'length' => '1', 'not null' => FALSE);
|
|
db_add_field( 'booking_studygroup_mapping', 'booking_is_reserveleader', $spec);
|
|
}
|
|
|
|
/**
|
|
* Update database to allow payments up to $10000
|
|
*/
|
|
function booking_update_7210() {
|
|
$spec = array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '7', 'scale' => '2');
|
|
db_change_field('booking_person', 'booking_amount_paid', 'booking_amount_paid', $spec);
|
|
db_change_field('booking_person', 'booking_total_pay_reqd', 'booking_total_pay_reqd', $spec);
|
|
db_change_field('booking_price', 'booking_price', 'booking_price', $spec);
|
|
db_change_field('booking_payment', 'booking_mc_gross', 'booking_mc_gross', $spec);
|
|
db_change_field('booking_payment', 'booking_mc_fee', 'booking_mc_fee', $spec);
|
|
return "Updated maximum payment successfully.";
|
|
}
|
|
|
|
/**
|
|
* Add boyfriend or girlfriend node ID field
|
|
*/
|
|
function booking_update_7211() {
|
|
$spec = array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'disp-width' => '10', 'default' => 0);
|
|
db_add_field( 'booking_person', 'booking_bf_gf_nid', $spec);
|
|
}
|
|
|
|
/**
|
|
* Add refund fields to booking registration table
|
|
*/
|
|
function booking_update_7212() {
|
|
$spec = array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '7', 'scale' => '2');
|
|
db_add_field( 'booking_person', 'booking_amount_refunded', $spec);
|
|
|
|
$spec2 = array('type' => 'varchar', 'length' => '1', 'not null' => FALSE, 'default' => 'N');
|
|
db_add_field( 'booking_person', 'booking_refund_processed', $spec2);
|
|
}
|
|
|
|
/**
|
|
* Rename refund field
|
|
*/
|
|
function booking_update_7213() {
|
|
$spec = array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '7', 'scale' => '2');
|
|
db_change_field('booking_person', 'booking_amount_refunded', 'booking_refund_due', $spec);
|
|
}
|
|
|
|
/**
|
|
* Add flag to indicate committee member
|
|
*/
|
|
function booking_update_7214() {
|
|
$spec = array('type' => 'varchar', 'length' => '1', 'not null' => FALSE, 'default' => 'N');
|
|
db_add_field('booking_person', 'booking_committee_member', $spec);
|
|
}
|
|
|
|
/**
|
|
* Add table to define reading groups and rooms at rathmines
|
|
*/
|
|
function booking_update_7215() {
|
|
//This gives a label to each reading group (ie, the colour)
|
|
$booking_readinggroup_definition = array(
|
|
'fields' => array(
|
|
'rid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
|
'booking_readinggroup_descrip' => array('type' => 'varchar', 'length' => '500', 'not null' => FALSE),
|
|
'booking_readinggroup_location' => array('type' => 'varchar', 'length' => '500', 'not null' => FALSE),
|
|
),
|
|
'primary key' => array('rid'),
|
|
);
|
|
|
|
$booking_room_definition = array(
|
|
'fields' => array(
|
|
'rid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
|
'booking_room_location_id' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'disp-width' => '10', 'default' => 0),
|
|
'booking_room_number' => array('type' => 'varchar', 'length' => '500', 'not null' => FALSE),
|
|
'booking_room_singlebeds' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'disp-width' => '10', 'default' => 0),
|
|
'booking_room_doublebeds' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'disp-width' => '10', 'default' => 0),
|
|
'booking_room_ensuite' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE, 'default' => 'N'),
|
|
),
|
|
'primary key' => array('rid'),
|
|
);
|
|
|
|
db_create_table('booking_readinggroup_definition', $booking_readinggroup_definition);
|
|
db_create_table('booking_room_definition', $booking_room_definition);
|
|
|
|
$result = db_insert('booking_room_definition')
|
|
->fields(array(
|
|
'booking_room_location_id' => 0,
|
|
'booking_room_number' => 1,
|
|
'booking_room_singlebeds' => 2,
|
|
'booking_room_doublebeds' => 0,
|
|
'booking_room_ensuite' => 'N',
|
|
))
|
|
->execute();
|
|
}
|
|
|
|
/**
|
|
* Add table for mapping people to rooms and a role field to the studygroup mapping table
|
|
*/
|
|
function booking_update_7216() {
|
|
$booking_room_mapping = array(
|
|
'fields' => array(
|
|
'mid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
|
'booking_roomid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'disp-width' => '10', 'default' => 0),
|
|
'booking_eventid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'disp-width' => '10', 'default' => 0),
|
|
'booking_nodeid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'disp-width' => '10', 'default' => 0),
|
|
),
|
|
'primary key' => array('mid'),
|
|
);
|
|
|
|
db_create_table('booking_room_mapping', $booking_room_mapping);
|
|
|
|
//also add a role column to the studygroup mapping table
|
|
$spec = array('type' => 'varchar', 'length' => '100', 'not null' => FALSE, 'default' => 0);
|
|
db_add_field( 'booking_studygroup_mapping', 'booking_studygroup_role', $spec);
|
|
}
|
|
|
|
/**
|
|
* Add queen bed option
|
|
*/
|
|
function booking_update_7217() {
|
|
$spec = array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'disp-width' => '10', 'default' => 0);
|
|
db_add_field('booking_room_definition', 'booking_room_queenbeds', $spec);
|
|
}
|
|
|
|
/**
|
|
* Add bed type to mapping table
|
|
*/
|
|
function booking_update_7218() {
|
|
$spec = array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'disp-width' => '10', 'default' => 0);
|
|
db_add_field('booking_room_mapping', 'booking_room_bedtype', $spec);
|
|
}
|
|
|
|
/**
|
|
* Add index to room mapping table
|
|
*/
|
|
function booking_update_7219() {
|
|
//$spec = array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10');
|
|
//db_add_field('booking_room_mapping', 'rid', $spec);
|
|
//db_add_index('booking_room_mapping', 'rid', array('booking_roomid', 'booking_eventid', 'booking_nodeid'));
|
|
}
|
|
|
|
/**
|
|
* Implementation of hook_install().
|
|
*/
|
|
function booking_install() {
|
|
// Create tables.
|
|
//not needed for d7
|
|
//drupal_install_schema('booking');
|
|
|
|
//TODO: Don't hard code this
|
|
//define('EVENTID', 1);
|
|
|
|
/*
|
|
limit bookings to 350
|
|
|
|
|
|
non workers $260
|
|
workers $300
|
|
married $540
|
|
|
|
full payment after 28 feb
|
|
$380 pp
|
|
*/
|
|
|
|
|
|
|
|
$result = db_insert('booking_price')
|
|
->fields(array(
|
|
'booking_eventid' => 1,
|
|
'booking_price' => '50.00',
|
|
'booking_price_descrip' => 'Deposit',
|
|
'booking_buttonid' => '9LMSELBEEL5W2',
|
|
'booking_price_active' => 1,
|
|
'booking_depositonly' => 1,
|
|
))
|
|
->execute();
|
|
|
|
$result = db_insert('booking_event')
|
|
->fields(array(
|
|
'booking_eventname' => 'Study Weekend 2012',
|
|
'booking_event_active' => 1,
|
|
'booking_register_open' => 1312207199,
|
|
'booking_register_close' => 1340459999,
|
|
'booking_earlybird_close' => 1328018399,
|
|
))
|
|
->execute();
|
|
|
|
//earlybird close is 31st Jan 2012 at 13:59:59 UTC
|
|
|
|
|
|
}
|
|
|
|
/**
|
|
* Implementation of hook_uninstall()
|
|
*/
|
|
function booking_uninstall() {
|
|
// Remove tables.
|
|
drupal_uninstall_schema('booking');
|
|
}
|
|
|
|
|
|
/**
|
|
* Implementation of hook_schema().
|
|
*/
|
|
function booking_schema() {
|
|
$schema['booking_person'] = array(
|
|
'fields' => array(
|
|
//identifiers
|
|
'nid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
|
'booking_event_id' => array('type' => 'int', 'length' => '11', 'default' => 0, 'not null' => FALSE),
|
|
'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_welfare_required' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE, 'default' => 'N'),
|
|
'booking_barcode' => array('type' => 'varchar', 'length' => '8', 'not null' => FALSE),
|
|
'booking_firstname' => array('type' => 'varchar', 'length' => '50', 'not null' => TRUE),
|
|
'booking_lastname' => array('type' => 'varchar', 'length' => '50', 'not null' => TRUE),
|
|
'booking_gender' => array('type' => 'varchar', 'length' => '1', 'not null' => TRUE),
|
|
'booking_dob' => array('type' => 'int', 'not null' => TRUE, 'disp-width' => '11'),
|
|
'booking_shirt_size' => array('type' => 'varchar', 'length' => '20', 'not null' => FALSE),
|
|
//address details
|
|
'booking_street' => array('type' => 'varchar', 'length' => '100', 'not null' => FALSE),
|
|
'booking_suburb' => array('type' => 'varchar', 'length' => '100', 'not null' => FALSE),
|
|
'booking_postcode' => array('type' => 'varchar', 'length' => '8', 'not null' => FALSE),
|
|
'booking_state' => array('type' => 'varchar', 'length' => '30', 'not null' => FALSE),
|
|
'booking_country' => array('type' => 'varchar', 'length' => '100', 'not null' => FALSE),
|
|
'booking_phone' => array('type' => 'varchar', 'length' => '50', 'not null' => FALSE),
|
|
'booking_mobile' => array('type' => 'varchar', 'length' => '50', 'not null' => FALSE),
|
|
'booking_email' => array('type' => 'varchar', 'length' => '200', 'not null' => TRUE),
|
|
'booking_ecclesia' => array('type' => 'varchar', 'length' => '100', 'not null' => FALSE),
|
|
'booking_baptised' => array('type' => 'varchar', 'length' => '1', 'not null' => TRUE),
|
|
//relationships
|
|
'booking_married' => array('type' => 'varchar', 'length' => '1', 'not null' => TRUE),
|
|
'booking_partner_name' => array('type' => 'varchar', 'length' => '100', 'not null' => FALSE),
|
|
'booking_partner_id' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'disp-width' => '10'),
|
|
'booking_bf_gf' => array('type' => 'varchar', 'length' => '100', 'not null' => FALSE),
|
|
'booking_bf_gf_nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'disp-width' => '10'),
|
|
'booking_room_mate1' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
|
|
'booking_room_mate2' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
|
|
//helping areas
|
|
'booking_readinggroup' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
|
|
'booking_help_music' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
|
|
'booking_help_reading' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE),
|
|
'booking_help_chairing' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE),
|
|
'booking_help_discussgroup_lead' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE),
|
|
'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),
|
|
//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),
|
|
'booking_guardian_phone' => array('type' => 'varchar', 'length' => '50', 'not null' => FALSE),
|
|
'booking_guardian_phone_alt' => array('type' => 'varchar', 'length' => '50', 'not null' => FALSE),
|
|
'booking_medicare' => array('type' => 'varchar', 'length' => '50', 'not null' => FALSE),
|
|
//'booking_medicare_expiry' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'),
|
|
//'booking_medicare_linenum' => array('type' => 'varchar', 'length' => '2', 'not null' => FALSE),
|
|
'booking_lifesaver' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE),
|
|
'booking_firstaid' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE),
|
|
'booking_nurse' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE),
|
|
'booking_doctor' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE),
|
|
'booking_dietary' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
|
|
'booking_medical_conditions' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
|
|
//payment info
|
|
'booking_payment_id' => array('type' => 'int', 'length' => '11', 'default' => 0, 'not null' => FALSE),
|
|
//'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'),
|
|
),
|
|
'primary key' => array('nid'),
|
|
);
|
|
$schema['booking_event'] = array(
|
|
'fields' => array(
|
|
'eid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
|
'booking_eventname' => array('type' => 'varchar', 'length' => '200', 'not null' => TRUE),
|
|
'booking_event_active' => array('type' => 'varchar', 'length' => '1', 'default' => 0, 'not null' => TRUE),
|
|
'booking_register_open' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'),
|
|
'booking_register_close' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'),
|
|
'booking_earlybird_close' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'),
|
|
'booking_event_start' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'),
|
|
'booking_event_end' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'),
|
|
),
|
|
'primary key' => array('eid'),
|
|
);
|
|
$schema['booking_price'] = array(
|
|
'fields' => array(
|
|
'pid' => 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_price' => array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '7', 'scale' => '2'),
|
|
'booking_late_price' => array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '5', 'scale' => '2'),
|
|
'booking_price_descrip' => array('type' => 'varchar', 'length' => '100', 'not null' => TRUE),
|
|
'booking_buttonid' => array('type' => 'varchar', 'length' => '50', 'not null' => FALSE),
|
|
'booking_late_buttonid' => array('type' => 'varchar', 'length' => '50', 'not null' => FALSE),
|
|
'booking_price_active' => array('type' => 'varchar', 'length' => '1', 'default' => 0, 'not null' => TRUE),
|
|
'booking_earlybird_rate' => array('type' => 'varchar', 'length' => '1', 'default' => 0, 'not null' => TRUE),
|
|
'booking_depositonly' => array('type' => 'varchar', 'length' => '1', 'default' => 0, 'not null' => TRUE),
|
|
),
|
|
'primary key' => array('pid'),
|
|
);
|
|
$schema['booking_payment'] = array(
|
|
'fields' => array(
|
|
'payid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
|
'booking_person_nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
|
'booking_eventid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
|
'booking_mc_gross' => array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '7', 'scale' => '2'),
|
|
'booking_mc_currency' => array('type' => 'varchar', 'length' => '10', 'not null' => FALSE),
|
|
'booking_mc_fee' => array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '7', 'scale' => '2'),
|
|
'booking_quantity' => array('type' => 'int', 'length' => 11, 'not null' => FALSE, 'default' => 0),
|
|
'booking_invoice' => array('type' => 'varchar', 'length' => '150', 'not null' => FALSE),
|
|
'booking_payer_id' => array('type' => 'varchar', 'length' => '150', 'not null' => FALSE),
|
|
'booking_payment_date' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'),
|
|
'booking_payment_status' => array('type' => 'varchar', 'length' => '50', 'not null' => FALSE),
|
|
'booking_first_name' => array('type' => 'varchar', 'length' => '100', 'not null' => FALSE),
|
|
'booking_last_name' => array('type' => 'varchar', 'length' => '100', 'not null' => FALSE),
|
|
'booking_buyer_email' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
|
|
'booking_payer_status' => array('type' => 'varchar', 'length' => '50', 'not null' => FALSE),
|
|
'booking_item_name' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
|
|
'booking_ipn_track_id' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE)),
|
|
'primary key' => array('payid'),
|
|
);
|
|
|
|
$schema['booking_variety_options'] = array(
|
|
'fields' => array(
|
|
'vid' => 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_timeslot_id' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
|
'booking_variety_descrip' => array('type' => 'varchar', 'length' => '500', 'not null' => TRUE),
|
|
'booking_variety_maxsize' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
|
'booking_variety_regncount' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
|
),
|
|
'primary key' => array('vid'),
|
|
);
|
|
|
|
$schema['booking_travel'] = array(
|
|
'fields' => array(
|
|
'tid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
|
'booking_person_nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
|
'booking_transport_type' => array('type' => 'varchar', 'length' => '100', 'not null' => FALSE),
|
|
'booking_transport_from_morriset_reqd' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE),
|
|
'booking_transport_to_morriset_reqd' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE),
|
|
'booking_flightnum_inbound' => array('type' => 'varchar', 'length' => '100', 'not null' => FALSE),
|
|
'booking_flight_datetime_inbound' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'),
|
|
'booking_flightnum_outbound' => array('type' => 'varchar', 'length' => '100', 'not null' => FALSE),
|
|
'booking_flight_datetime_outbound' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'),
|
|
'booking_accom_before_reqd' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE),
|
|
'booking_accom_before_staying_with' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
|
|
'booking_accom_after_reqd' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE),
|
|
'booking_accom_after_staying_with' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
|
|
),
|
|
'primary key' => array('tid'),
|
|
);
|
|
|
|
|
|
return $schema;
|
|
}
|