You are here

function rooms_unit_update_7001 in Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals 7

Changes base_price field to numeric storage.

File

modules/rooms_unit/rooms_unit.install, line 389
Sets up the base table for our entity and a table to store information about the entity types.

Code

function rooms_unit_update_7001() {
  $base_price_field_spec = array(
    'description' => 'The default cost per night for the unit',
    'type' => 'numeric',
    'not null' => TRUE,
    'precision' => 10,
    'scale' => 2,
    'default' => 0,
  );
  db_change_field('rooms_units', 'base_price', 'base_price', $base_price_field_spec);
  return t('Schema for the rooms_unit table has been updated.');
}