function emapi_schema in Embedded Media Field 6.3
Implementation of hook_schema().
File
- emapi/
emapi.install, line 43 - This is Embedded Media API's installation, configuration, and removal file.
Code
function emapi_schema() {
$schema = array();
$schema['cache_emapi_xml'] = drupal_get_schema_unprocessed('system', 'cache');
$schema['cache_emapi_xml']['description'] = 'Cache table used to store xml data for Embedded Media API.';
$schema['emapi_media'] = array(
'description' => 'Stores Embedded Media info.',
'fields' => array(
'emid' => array(
'description' => 'The unique ID of the media.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'uri' => array(
'description' => 'Unique URI for the media.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'uid' => array(
'description' => 'The {users}.uid of the user who is associated with the media.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'status' => array(
'description' => 'A bitmapped field indicating the status of the media. The least significant bit indicates temporary (0) or permanent (1). Temporary media older than DRUPAL_MAXIMUM_TEMP_FILE_AGE will be removed during a cron run.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'timestamp' => array(
'description' => 'UNIX timestamp for when the media was added.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
),
'indexes' => array(
'uid' => array(
'uid',
),
'status' => array(
'status',
),
'timestamp' => array(
'timestamp',
),
),
'unique keys' => array(
'uri' => array(
'uri',
),
),
'primary key' => array(
'emid',
),
'foreign keys' => array(
'uid' => array(
'users' => 'uid',
),
),
);
return $schema;
}