You are here

function video_embed_field_field_schema in Video Embed Field 7

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

Implementation of hook_field_schema Define the schema for the field

File

./video_embed_field.install, line 13

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' => '',
        ),
        'embed_code' => array(
          'type' => 'varchar',
          'length' => 1024,
          'default' => '',
        ),
        'description' => array(
          'type' => 'text',
          'not null' => FALSE,
        ),
      );
      $indexes = array();
      break;
  }
  return array(
    'columns' => $columns,
    'indexes' => $indexes,
  );
}