You are here

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

Rename columns 'weekly_price' in 'weekly_discount' and 'monthly_price' in 'monthly_discount'.

File

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

Code

function rooms_unit_update_7014() {
  db_change_field('rooms_units', 'weekly_price', 'weekly_discount', array(
    'description' => 'The default weekly discount for the unit',
    'type' => 'numeric',
    'not null' => TRUE,
    'precision' => 10,
    'scale' => 2,
    'default' => 0,
  ));
  db_change_field('rooms_units', 'monthly_price', 'monthly_discount', array(
    'description' => 'The default monthly discount for the unit',
    'type' => 'numeric',
    'not null' => TRUE,
    'precision' => 10,
    'scale' => 2,
    'default' => 0,
  ));
}