You are here

function office_hours_field_schema in Office Hours 7

Implements hook_field_schema().

File

./office_hours.install, line 10
Install, update and uninstall functions for the Office hours module.

Code

function office_hours_field_schema($field) {
  switch ($field['type']) {
    case 'office_hours':
      $db_columns = array(
        'day' => array(
          'type' => 'int',
          'not null' => FALSE,
        ),
        'starthours' => array(
          'type' => 'int',
          'not null' => FALSE,
        ),
        'endhours' => array(
          'type' => 'int',
          'not null' => FALSE,
        ),
        'comment' => array(
          'type' => 'varchar',
          'length' => 255,
          'not null' => FALSE,
        ),
      );
      break;
  }
  return array(
    'columns' => $db_columns,
  );
}