function media_metadata_schema in D7 Media 6
Implementation of hook_schema().
File
- media_metadata/
media_metadata.install, line 23
Code
function media_metadata_schema() {
$schema['media_metadata'] = array(
'description' => 'Stores file resource metadata.',
'fields' => array(
'mid' => array(
'description' => 'The primary identifier for a metadata pair.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'fid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => 'Primary Key: The {files}.fid.',
),
'name' => array(
'default' => '',
'description' => 'The metadata key name.',
'length' => 255,
'not null' => TRUE,
'type' => 'varchar',
),
'data' => array(
'type' => 'text',
'not null' => FALSE,
'description' => 'The value of metadata value pairs that are related to the file resource.',
),
),
'primary key' => array(
'mid',
),
'indexes' => array(
'fid',
'name',
),
);
return $schema;
}