update room number field to be an integer
This commit is contained in:
@@ -595,6 +595,16 @@ function booking_update_7238() {
|
||||
_booking_node_create_mysqlview();
|
||||
}
|
||||
|
||||
/**
|
||||
* Change room number field in room definitions to integer
|
||||
*/
|
||||
function booking_update_7239() {
|
||||
$spec = array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'disp-width' => '10', 'default' => 0);
|
||||
db_change_field('booking_room_definition', 'booking_room_number', 'booking_room_number', $spec);
|
||||
//update the view to match the new table definition
|
||||
_booking_node_create_mysqlview();
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of hook_install().
|
||||
*/
|
||||
@@ -926,7 +936,7 @@ function booking_schema() {
|
||||
'fields' => array(
|
||||
'rid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
||||
'booking_room_location_id' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'disp-width' => '10', 'default' => 0),
|
||||
'booking_room_number' => array('type' => 'varchar', 'length' => '500', 'not null' => FALSE),
|
||||
'booking_room_number' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'disp-width' => '10', 'default' => 0),
|
||||
'booking_room_singlebeds' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => FALSE, 'disp-width' => '10', 'default' => 0),
|
||||
'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),
|
||||
|
Reference in New Issue
Block a user