You are here

function brightcove_schema in Brightcove Video Connect 8

Same name and namespace in other branches
  1. 8.2 brightcove.install \brightcove_schema()
  2. 7.7 brightcove.install \brightcove_schema()
  3. 7.2 brightcove.install \brightcove_schema()
  4. 7.3 brightcove.install \brightcove_schema()
  5. 7.4 brightcove.install \brightcove_schema()
  6. 7.5 brightcove.install \brightcove_schema()
  7. 7.6 brightcove.install \brightcove_schema()
  8. 3.x brightcove.install \brightcove_schema()

Implements hook_schema().

File

./brightcove.install, line 18
Brightcove install file.

Code

function brightcove_schema() {
  return [
    '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',
        ],
      ],
    ],
  ];
}