You are here

function birthdays_field_schema in Birthdays 7

Implements hook_field_schema().

File

./birthdays.install, line 11
Installation file for the Birthdays module.

Code

function birthdays_field_schema($field) {
  return array(
    'columns' => array(
      'day' => array(
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'unsigned' => TRUE,
        'default' => 0,
      ),
      'month' => array(
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'unsigned' => TRUE,
        'default' => 0,
      ),
      'year' => array(
        'type' => 'int',
        'size' => 'medium',
        'not null' => TRUE,
        'unsigned' => TRUE,
        'default' => 0,
      ),
      'triggers' => array(
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'unsigned' => TRUE,
        'default' => 1,
      ),
    ),
    'indexes' => array(
      'date' => array(
        'day',
        'month',
        'year',
      ),
      'triggers' => array(
        'triggers',
      ),
    ),
  );
}