add db field for previous sw coun

This commit is contained in:
Nathan Coad
2019-09-10 09:34:49 +10:00
parent cf2d40033a
commit 5d848794b9
2 changed files with 54 additions and 33 deletions

View File

@@ -822,6 +822,16 @@ function booking_update_7257() {
_booking_node_create_mysqlview();
}
/**
* Add field to store number of previous study weeks
*/
function booking_update_7258() {
$spec = array('type' => 'int', 'length' => '11', 'default' => 0, 'not null' => FALSE);
db_add_field('booking_person', 'booking_prev_sw_count', $spec);
//update the view to match the new table definition
_booking_node_create_mysqlview();
}
/**
* Implementation of hook_install().
*/
@@ -985,6 +995,9 @@ function booking_schema() {
'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_song_choice' => array('type' => 'varchar', 'length' => '500', 'not null' => FALSE),
'booking_freestyle_text' => array('type' => 'varchar', 'length' => '1000', 'not null' => FALSE),
'booking_prev_sw_count' => array('type' => 'int', 'length' => '11', 'default' => 0, 'not null' => FALSE),
/*
),
'foreign keys' => array(