remove old passport and flight info from cahaya
This commit is contained in:
@@ -538,6 +538,25 @@ function booking_update_7233() {
|
||||
_booking_node_create_mysqlview();
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove deprecated passport/flight details
|
||||
*/
|
||||
function booking_update_7234() {
|
||||
$fields = array(
|
||||
'booking_passport_expiry_date', 'booking_passport_num', 'booking_passport_issue_location',
|
||||
'booking_passport_issue_name', 'booking_destination_country', 'booking_travel_insurance',
|
||||
'booking_outflight_bookingnum', 'booking_outflight_flightnum', 'booking_outflight_origin',
|
||||
'booking_outflight_origin_ts', 'booking_outflight_connecting_flightnum', 'booking_outflight_destination',
|
||||
'booking_outflight_destination_ts', 'booking_rtrnflight_bookingnum', 'booking_rtrnflight_flightnum',
|
||||
'booking_rtrnflight_origin', 'booking_rtrnflight_origin_ts', 'booking_rtrnflight_connecting_flightnum',
|
||||
'booking_rtrnflight_destination', 'booking_rtrnflight_destination_ts'
|
||||
);
|
||||
foreach ($fields as $field) {
|
||||
db_drop_field('booking_person', $field);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Implementation of hook_install().
|
||||
*/
|
||||
@@ -684,6 +703,7 @@ function booking_schema() {
|
||||
'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
||||
|
||||
*/
|
||||
/*
|
||||
//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),
|
||||
@@ -707,6 +727,7 @@ function booking_schema() {
|
||||
'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),
|
||||
*/
|
||||
/*
|
||||
),
|
||||
'foreign keys' => array(
|
||||
@@ -722,33 +743,31 @@ function booking_schema() {
|
||||
'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'),
|
||||
'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' => '7', '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),
|
||||
'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' => '7', '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'),
|
||||
);
|
||||
|
Reference in New Issue
Block a user