function rooms_unit_update_7003 in Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals 7
Adds fields for children.
File
- modules/
rooms_unit/ rooms_unit.install, line 414 - Sets up the base table for our entity and a table to store information about the entity types.
Code
function rooms_unit_update_7003() {
$cot_surcharge = array(
'description' => 'The default cot_surcharge',
'type' => 'numeric',
'not null' => TRUE,
'precision' => 10,
'scale' => 2,
'default' => 0,
);
db_add_field('rooms_units', 'cot_surcharge', $cot_surcharge);
$children = array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'size' => 'tiny',
'description' => 'How many children can sleep in a unit',
);
db_add_field('rooms_units', 'children', $children);
}