Added destination country and updated import data functions

This commit is contained in:
2014-06-25 11:33:52 +10:00
parent e64749704e
commit d7b12517b5
6 changed files with 90 additions and 7 deletions

View File

@@ -389,11 +389,29 @@ function booking_update_7218() {
* Add index to room mapping table
*/
function booking_update_7219() {
//couldn't get this to work, added via mysql directly
//ALTER TABLE booking_room_mapping ADD mid Int NOT NULL AUTO_INCREMENT PRIMARY KEY;
//$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'));
}
/**
* Add field for "lucky number" on the lanyard
*/
function booking_update_7220() {
$spec = array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'disp-width' => '10', 'default' => 0);
db_add_field('booking_person', 'booking_luckynum', $spec);
}
/**
* Add field for destination country when collecting passport informaiton
*/
function booking_update_7221() {
$spec = array('type' => 'varchar', 'length' => '500', 'not null' => FALSE);
db_add_field('booking_person', 'booking_destination_country', $spec);
}
/**
* Implementation of hook_install().
*/
@@ -467,7 +485,7 @@ function booking_schema() {
'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_barcode' => array('type' => 'varchar', 'length' => '20', '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),