function file_field_schema

Implements hook_field_schema().

File

modules/file/file.install, line 11

Code

function file_field_schema($field) {
    return array(
        'columns' => array(
            'fid' => array(
                'description' => 'The {file_managed}.fid being referenced in this field.',
                'type' => 'int',
                'not null' => FALSE,
                'unsigned' => TRUE,
            ),
            'display' => array(
                'description' => 'Flag to control whether this file should be displayed when viewing content.',
                'type' => 'int',
                'size' => 'tiny',
                'unsigned' => TRUE,
                'not null' => TRUE,
                'default' => 1,
            ),
            'description' => array(
                'description' => 'A description of the file.',
                'type' => 'text',
                'not null' => FALSE,
            ),
        ),
        'indexes' => array(
            'fid' => array(
                'fid',
            ),
        ),
        'foreign keys' => array(
            'fid' => array(
                'table' => 'file_managed',
                'columns' => array(
                    'fid' => 'fid',
                ),
            ),
        ),
    );
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.