You are here

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

Implements hook_field_schema().

File

modules/rooms_availability_reference/rooms_availability_reference.install, line 12
Install, update and uninstall functions for the rooms_availability_reference module.

Code

function rooms_availability_reference_field_schema($field) {
  $columns = array(
    'unit_id' => array(
      'type' => 'int',
      'unsigned' => TRUE,
      'not null' => FALSE,
    ),
  );
  return array(
    'columns' => $columns,
    'indexes' => array(
      'unit_id' => array(
        'unit_id',
      ),
    ),
    'foreign keys' => array(
      'unit_id' => array(
        'table' => 'rooms_units',
        'columns' => array(
          'unit_id' => 'unit_id',
        ),
      ),
    ),
  );
}