You are here

rooms_availability_reference.install in Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals 7

Install, update and uninstall functions for the rooms_availability_reference module.

File

modules/rooms_availability_reference/rooms_availability_reference.install
View source
<?php

/**
 * @file
 * Install, update and uninstall functions for the rooms_availability_reference
 * module.
 */

/**
 * Implements hook_field_schema().
 */
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',
        ),
      ),
    ),
  );
}