You are here

function video_embed_field_field_schema in Video Embed Field 7.2

Same name and namespace in other branches
  1. 7 video_embed_field.install \video_embed_field_field_schema()

Implements hook_field_schema().

File

./video_embed_field.install, line 16
Install, update and uninstall functions for the video_embed_field module.

Code

function video_embed_field_field_schema($field) {
  switch ($field['type']) {
    case 'video_embed_field':
      $columns = array(
        'video_url' => array(
          'type' => 'varchar',
          'length' => 512,
          'default' => '',
        ),
        'thumbnail_path' => array(
          'type' => 'varchar',
          'length' => 512,
          'default' => '',
        ),
        'video_data' => array(
          'type' => 'blob',
          'not null' => FALSE,
          'size' => 'big',
          'serialize' => TRUE,
        ),
        'embed_code' => array(
          'type' => 'varchar',
          'length' => 1024,
          'default' => '',
        ),
        'description' => array(
          'type' => 'text',
          'not null' => FALSE,
        ),
      );
      $indexes = array();
      break;
  }
  return array(
    'columns' => $columns,
    'indexes' => $indexes,
  );
}