function media_youtube_schema in Media: YouTube 6
Implementation of hook_schema().
File
- ./
media_youtube.install, line 320 - This is Media: YouTube's installation, configuration, and removal file.
Code
function media_youtube_schema() {
$schema = array();
$schema['cache_media_youtube_status'] = drupal_get_schema_unprocessed('system', 'cache');
$schema['cache_media_youtube_status']['description'] = 'Cache table used to store video status for Media: YouTube.';
$schema['media_youtube_metadata'] = array(
'description' => 'Media: YouTube table for video metadata.',
'fields' => array(
'value' => array(
'description' => 'The identifier for a YouTube video.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
),
'status' => array(
'description' => "The availability status of this media.",
'type' => 'int',
'unsigned' => 'TRUE',
'not null' => TRUE,
'default' => MEDIA_YOUTUBE_STATUS_AVAILABLE,
),
'last_touched' => array(
'description' => "Timestamp when the data was last retrieved from YouTube.",
'type' => 'int',
'unsigned' => 'TRUE',
'not null' => TRUE,
'default' => 0,
),
),
'indexes' => array(
'status' => array(
'status',
),
'last_touched' => array(
'last_touched',
),
),
'primary key' => array(
'value',
),
);
$schema['media_youtube_node_data'] = array(
'description' => 'Media: YouTube table for video node reference.',
'fields' => array(
'value' => array(
'description' => 'The identifier for a YouTube video.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
),
'vid' => array(
'description' => 'The {node} vid.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'field_name' => array(
'description' => 'The node field storing this data.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'delta' => array(
'description' => "The field delta.",
'type' => 'int',
'unsigned' => 'TRUE',
'not null' => TRUE,
'default' => 0,
),
),
'indexes' => array(
'value' => array(
'value',
),
'vid' => array(
'vid',
),
'field_name' => array(
'field_name',
),
'delta' => array(
'delta',
),
),
);
return $schema;
}