You are here

function video_field_schema in Video 7

Same name and namespace in other branches
  1. 7.2 video.install \video_field_schema()

Implements hook_field_schema().

File

./video.install, line 150
Provides installation schema for video.module @author Heshan Wanigasooriya <heshan@heidisoft.com>

Code

function video_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,
      ),
      'thumbnail' => array(
        'description' => 'The {file_managed}.fid being referenced for video thumbanil.',
        'type' => 'int',
        'not null' => FALSE,
        'unsigned' => TRUE,
      ),
      'player_dimensions' => array(
        'description' => "Video dimention for the video player.",
        'type' => 'varchar',
        'length' => 32,
        'not null' => FALSE,
      ),
    ),
    'indexes' => array(
      'fid' => array(
        'fid',
      ),
    ),
    'foreign keys' => array(
      'fid' => array(
        'table' => 'file_managed',
        'columns' => array(
          'fid' => 'fid',
        ),
      ),
    ),
  );
}