You are here

function zoomapi_schema in Zoom API 7

Same name and namespace in other branches
  1. 7.2 zoomapi.install \zoomapi_schema()

Implements hook_schema().

2 calls to zoomapi_schema()
zoomapi_update_7101 in ./zoomapi.install
Generate the Zoom API meeting tracker tables.
zoomapi_update_7102 in ./zoomapi.install
Add uuid column to meeting tracker table.

File

./zoomapi.install, line 99
Install, update, and uninstall hooks for the Zoom API module.

Code

function zoomapi_schema() {
  $schema['zoomapi_meeting_tracker'] = [
    'description' => 'Temporary meeting tracker to assist with looking up basic meeting info',
    'fields' => [
      'uuid' => [
        'description' => 'The Zoom meeting UUID',
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
        'default' => '',
      ],
      'meeting_id' => [
        'description' => 'The Zoom provided meeting ID.',
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
        'default' => '',
      ],
      'host_zoom_user_id' => [
        'description' => 'The meeting host zoom provided user ID.',
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
        'default' => '',
      ],
      'topic' => [
        'description' => 'The meeting topic.',
        'type' => 'varchar',
        'length' => 300,
        'not null' => TRUE,
        'default' => '',
      ],
      'meeting_type' => [
        'description' => 'The Zoom meeting type. (1 instant, 2 normal scheduled, 3 recurring no fixed time, 8 recurring fixed time.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ],
      'start_time' => [
        'description' => 'The meeting start timestamp.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ],
      'duration' => [
        'description' => 'The meeting duration (minutes). For scheduled meeting only.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ],
      'timezone' => [
        'description' => 'The meeting timezone.',
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'default' => '',
      ],
      'start_url' => [
        'description' => 'The meeting host start/join URL.',
        'type' => 'varchar',
        'length' => 2000,
        'not null' => TRUE,
        'default' => '',
      ],
      'join_url' => [
        'description' => 'The meeting participant join URL.',
        'type' => 'varchar',
        'length' => 2000,
        'not null' => TRUE,
        'default' => '',
      ],
      'created' => [
        'description' => 'The timestamp when this record was created.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ],
      'entity_type' => [
        'description' => 'The Drupal entity the meeting was created for.',
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'default' => '',
      ],
      'entity_id' => [
        'description' => 'The Drupal entity ID the meeting was created for.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ],
      'data' => [
        'description' => 'The meeting array / data provided from Zoom.',
        'type' => 'blob',
        'not null' => FALSE,
        'size' => 'big',
        'serialize' => TRUE,
      ],
      'expires' => [
        'description' => 'Timestamp when this record is no longer necessary. 0 for permanent.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ],
    ],
    'indexes' => [
      'zoomapi_uuid' => [
        'uuid',
      ],
      'zoomapi_meeting_id' => [
        'meeting_id',
      ],
      'zoomapi_host_zoom_user_id' => [
        'host_zoom_user_id',
      ],
      'zoomapi_meeting_type' => [
        'meeting_type',
      ],
      'zoomapi_start_time' => [
        'start_time',
      ],
      'zoomapi_created' => [
        'created',
      ],
      'zoomapi_entity_type' => [
        'entity_type',
      ],
      'zoomapi_entity_id' => [
        'entity_id',
      ],
      'zoomapi_expires' => [
        'expires',
      ],
    ],
    'primary key' => [
      'uuid',
    ],
  ];
  return $schema;
}