function brightcove_update_8108 in Brightcove Video Connect 8
Same name and namespace in other branches
- 8.2 brightcove.install \brightcove_update_8108()
- 3.x brightcove.install \brightcove_update_8108()
Create schema for the BrightcoveSubscription entity.
File
- ./
brightcove.install, line 349 - Brightcove install file.
Code
function brightcove_update_8108(&$sandbox) {
\Drupal::database()
->schema()
->createTable('brightcove_subscription', [
'description' => 'Brightcove Subscription storage.',
'fields' => [
'id' => [
'description' => 'Internal BrightcoveSubscription entity ID.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
],
'bcsid' => [
'description' => 'Brightcove Subscription ID.',
'type' => 'char',
'length' => 36,
'not null' => FALSE,
],
'status' => [
'description' => 'Status of the subscription.',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 1,
'unsigned' => TRUE,
],
'is_default' => [
'description' => 'Whether the Subscription is default or not.',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
'unsigned' => TRUE,
],
'api_client_id' => [
'description' => 'The ID of the API client',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
],
'endpoint' => [
'description' => 'The endpoint for the notification.',
'type' => 'varchar',
'length' => 2000,
'not null' => TRUE,
],
'events' => [
'description' => 'Notification events.',
'type' => 'blob',
'not null' => TRUE,
],
],
'primary key' => [
'id',
],
'indexes' => [
'bcsid' => [
'bcsid',
],
'endpoint' => [
'endpoint',
],
'api_client_id' => [
'api_client_id',
],
'api_client_default' => [
'api_client_id',
'is_default',
],
],
]);
}