function brightcove_schema in Brightcove Video Connect 7.7
Same name and namespace in other branches
- 8.2 brightcove.install \brightcove_schema()
- 8 brightcove.install \brightcove_schema()
- 7.2 brightcove.install \brightcove_schema()
- 7.3 brightcove.install \brightcove_schema()
- 7.4 brightcove.install \brightcove_schema()
- 7.5 brightcove.install \brightcove_schema()
- 7.6 brightcove.install \brightcove_schema()
- 3.x brightcove.install \brightcove_schema()
Implements hook_schema().
File
- ./
brightcove.install, line 44 - Installation file for Brightcove module.
Code
function brightcove_schema() {
$schema = [];
$schema['cache_brightcove'] = drupal_get_schema_unprocessed('system', 'cache');
$schema['brightcove_client'] = [
'description' => 'The base table for brightcove clients.',
'fields' => [
'bcid' => [
'description' => 'The primary identifier for a brightcove client, used internally only.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
],
'label' => [
'description' => 'The label of this client.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
],
'account_id' => [
'description' => 'The ID of the account this client belongs to.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
],
'client_id' => [
'description' => 'The client ID.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
],
'client_secret' => [
'description' => 'The client secret key.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
],
'uid' => [
'description' => 'The {users}.uid that created this client.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
],
'created' => [
'description' => 'The Unix timestamp when the client was created.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
],
'changed' => [
'description' => 'The Unix timestamp when the client was most recently saved.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
],
'data' => [
'type' => 'blob',
'not null' => FALSE,
'size' => 'big',
'serialize' => TRUE,
'description' => 'A serialized array of additional data.',
],
'status' => [
'type' => 'int',
'not null' => TRUE,
'default' => 0x1,
'size' => 'tiny',
'description' => 'The exportable status of the entity.',
],
'module' => [
'description' => 'The name of the providing module if the entity has been defined in code.',
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
],
],
'primary key' => [
'bcid',
],
'unique keys' => [
'client_id' => [
'client_id',
],
],
'creator' => [
'table' => 'users',
'columns' => [
'uid' => 'uid',
],
],
];
$schema['brightcove_callback'] = [
'fields' => [
'id' => [
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
],
'fid' => [
'type' => 'int',
'not null' => TRUE,
],
'expires' => [
'type' => 'int',
'not null' => TRUE,
],
'hash' => [
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
],
'client' => [
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
],
'parent_entity_type' => [
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
],
'parent_field_name' => [
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
],
'parent_bundle_name' => [
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
],
'metadata' => [
'type' => 'text',
'not null' => TRUE,
],
],
'primary key' => [
'id',
],
];
$schema['brightcove_video'] = [
'description' => 'Stores information about brightcove video.',
'fields' => [
'bvid' => [
'type' => 'serial',
'not null' => TRUE,
'description' => 'Primary Key: Unique key for brightcove video.',
],
'type' => [
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
],
'video_id' => [
'description' => 'The ID of the video.',
'type' => 'int',
'not null' => TRUE,
'size' => 'big',
],
'account_id' => [
'description' => 'The ID of the brightcove account this video belongs to.',
'type' => 'int',
'not null' => TRUE,
'size' => 'big',
],
],
'primary key' => [
'bvid',
],
'unique keys' => [
'client_video' => [
'video_id',
],
],
];
return $schema;
}