This commit is contained in:
2016-06-11 14:23:44 +10:00
parent 5e6a06f97a
commit 7366ce52cf
2 changed files with 5 additions and 1 deletions

View File

@@ -14,7 +14,7 @@ function booking_admin()
//create the mysql view booking_person_view if necessary //create the mysql view booking_person_view if necessary
try { try {
$sqlview_check = db_query("SELECT 1 FROM {booking_person_view}")->fetchAssoc(); $sqlview_check = db_query("SELECT 1 FROM {booking_person_view}")->fetchAssoc();
//watchdog('booking_debug', "<pre>SQL View booking_person_view check\n@info</pre>", array('@info' => print_r( $sqlview_check, true))); watchdog('booking_debug', "<pre>SQL View booking_person_view check\n@info</pre>", array('@info' => print_r( $sqlview_check, true)));
} }
catch (Exception $e) { catch (Exception $e) {
watchdog('booking_debug', "<pre>SQL View booking_person_view check does not exist\n@info</pre>", array('@info' => $e->getMessage())); watchdog('booking_debug', "<pre>SQL View booking_person_view check does not exist\n@info</pre>", array('@info' => $e->getMessage()));

View File

@@ -554,6 +554,8 @@ function booking_update_7234() {
foreach ($fields as $field) { foreach ($fields as $field) {
db_drop_field('booking_person', $field); db_drop_field('booking_person', $field);
} }
//update the view to match the new table definition
_booking_node_create_mysqlview();
} }
/** /**
* Add email address for guardian contact info * Add email address for guardian contact info
@@ -561,6 +563,8 @@ function booking_update_7234() {
function booking_update_7235() { function booking_update_7235() {
$spec = array('type' => 'varchar', 'length' => '250', 'not null' => FALSE); $spec = array('type' => 'varchar', 'length' => '250', 'not null' => FALSE);
db_add_field('booking_person', 'booking_guardian_email', $spec); db_add_field('booking_person', 'booking_guardian_email', $spec);
//update the view to match the new table definition
_booking_node_create_mysqlview();
} }
/** /**