add room description field

This commit is contained in:
2016-06-27 11:34:24 +10:00
parent 622c84314b
commit 805c639e5d
3 changed files with 66 additions and 57 deletions

View File

@@ -585,6 +585,16 @@ function booking_update_7237() {
_booking_node_create_mysqlview();
}
/**
* Add description field to room definitions
*/
function booking_update_7237() {
$spec = array('type' => 'varchar', 'length' => '200', 'not null' => FALSE);
db_add_field('booking_room_definition', 'booking_room_description', $spec);
//update the view to match the new table definition
_booking_node_create_mysqlview();
}
/**
* Implementation of hook_install().
*/
@@ -921,6 +931,7 @@ function booking_schema() {
'booking_room_doublebeds' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'disp-width' => '10', 'default' => 0),
'booking_room_queenbeds' => 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'),
'booking_room_description' => array('type' => 'varchar', 'length' => '200', 'not null' => TRUE),
),
'primary key' => array('rid'),
);